473,586 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code for finding manufacturer serial number for hard drive in C#

Hi, If you understand the subject of my post that means you would know
why i want this. Please dont give me the code for Volume number as i
am talking about manufacturer serial number. I am working on C# and I
know about win32_PhysicalM edia to retrieve the manufacturer serial
number but that does not work for Win 2000 and I want something that
works for Win 2000. Even if there is no solution in C# but you have
something in C or J# that could help me that would be great too. Again
please dont refer me to DiskId32 to get serial number as I have
already spent alot of time trying to invoke it from C# , I tried
wrapping procedures, but that does not work. So please I really need
help and await a reasonable response from some genie out there.
Nov 17 '05 #1
5 7059
ta********@gmai l.com (Tayyab) wrote in message news:<c9******* *************** ****@posting.go ogle.com>...
Hi, If you understand the subject of my post that means you would know
why i want this. Please dont give me the code for Volume number as i
am talking about manufacturer serial number. I am working on C# and I
know about win32_PhysicalM edia to retrieve the manufacturer serial
number but that does not work for Win 2000 and I want something that
works for Win 2000. Even if there is no solution in C# but you have
something in C or J# that could help me that would be great too. Again
please dont refer me to DiskId32 to get serial number as I have
already spent alot of time trying to invoke it from C# , I tried
wrapping procedures, but that does not work. So please I really need
help and await a reasonable response from some genie out there.

hey u ppl sleeping or what give me some ideas i need them.
Nov 17 '05 #2
TC

Tayyab wrote:

(snip)
hey u ppl sleeping or what give me some ideas i need them.
That is an unwise thing for you to say. People are under no obligation
to help you. You should not attempt to demand a reply.
Having said that ...
From what I remember of diskid32, the problem is not the programming

language: the problem is how to actually do it! In other words, there
is no piece of simple code that will do it reliably for all hard disks.

Could you talk to the developer of diskid32 & see if he would licence
the sourcecode?

Perhaps he'd do it if you produced a version in the language you want,
then released that version back to him, for him to add to his page.

HTH,
TC

Nov 17 '05 #3
Hi,

you can send an "IOCTL_SCSI_PAS S_THROUGH_DIREC T" Command
with an ATA-RegisterFile or SRB setup for an "Identify Drive" Command.
The Output-Buffer of this IOCTL contains a 512-Byte-Sector with the
configuration Data.
I can provide you (if you want this) with some sample-code that has worked
for me.

regards

Reiner

"Tayyab" <ta********@gma il.com> schrieb im Newsbeitrag
news:c9******** *************** ***@posting.goo gle.com...
Hi, If you understand the subject of my post that means you would know
why i want this. Please dont give me the code for Volume number as i
am talking about manufacturer serial number. I am working on C# and I
know about win32_PhysicalM edia to retrieve the manufacturer serial
number but that does not work for Win 2000 and I want something that
works for Win 2000. Even if there is no solution in C# but you have
something in C or J# that could help me that would be great too. Again
please dont refer me to DiskId32 to get serial number as I have
already spent alot of time trying to invoke it from C# , I tried
wrapping procedures, but that does not work. So please I really need
help and await a reasonable response from some genie out there.

Nov 17 '05 #4
I'd like to see that code. Can you post it here?

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Reiner Ziegler" <Re************ @mail.regio.net > wrote in message
news:eB******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

you can send an "IOCTL_SCSI_PAS S_THROUGH_DIREC T" Command
with an ATA-RegisterFile or SRB setup for an "Identify Drive" Command.
The Output-Buffer of this IOCTL contains a 512-Byte-Sector with the
configuration Data.
I can provide you (if you want this) with some sample-code that has worked
for me.

regards

Reiner

"Tayyab" <ta********@gma il.com> schrieb im Newsbeitrag
news:c9******** *************** ***@posting.goo gle.com...
Hi, If you understand the subject of my post that means you would know
why i want this. Please dont give me the code for Volume number as i
am talking about manufacturer serial number. I am working on C# and I
know about win32_PhysicalM edia to retrieve the manufacturer serial
number but that does not work for Win 2000 and I want something that
works for Win 2000. Even if there is no solution in C# but you have
something in C or J# that could help me that would be great too. Again
please dont refer me to DiskId32 to get serial number as I have
already spent alot of time trying to invoke it from C# , I tried
wrapping procedures, but that does not work. So please I really need
help and await a reasonable response from some genie out there.


Nov 17 '05 #5
Bob,

the Code I'm written is in "unmanaged" C++
(although more C than ++ *grin*)
and it's only pertinent to ATA-Disks!
Are you're still interested?

regards

Reiner
----------------------------------------------------------------------------
---
"Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > schrieb im Newsbeitrag
news:#8******** *****@TK2MSFTNG P15.phx.gbl...
I'd like to see that code. Can you post it here?

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Reiner Ziegler" <Re************ @mail.regio.net > wrote in message
news:eB******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

you can send an "IOCTL_SCSI_PAS S_THROUGH_DIREC T" Command
with an ATA-RegisterFile or SRB setup for an "Identify Drive" Command.
The Output-Buffer of this IOCTL contains a 512-Byte-Sector with the
configuration Data.
I can provide you (if you want this) with some sample-code that has worked for me.

regards

Reiner

"Tayyab" <ta********@gma il.com> schrieb im Newsbeitrag
news:c9******** *************** ***@posting.goo gle.com...
Hi, If you understand the subject of my post that means you would know
why i want this. Please dont give me the code for Volume number as i
am talking about manufacturer serial number. I am working on C# and I
know about win32_PhysicalM edia to retrieve the manufacturer serial
number but that does not work for Win 2000 and I want something that
works for Win 2000. Even if there is no solution in C# but you have
something in C or J# that could help me that would be great too. Again
please dont refer me to DiskId32 to get serial number as I have
already spent alot of time trying to invoke it from C# , I tried
wrapping procedures, but that does not work. So please I really need
help and await a reasonable response from some genie out there.



Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2673
by: | last post by:
Hi, Do memory sticks have serial numbers like harddrives? If so how can I get this, I want to uniquely identify a memory stick (removable drive) for authentication. Thanks
11
1914
by: Wilsoch | last post by:
Long story short: My Access developer is letting me down. He doesn't really know VB and he can't figure out how to do what I need. Situation: Access database that will be used locally on individual user's machines. What I need: I need code to make Access look for a "security" file located on the user's hard drive. If it finds the file,...
14
28108
by: Lauren Wilson | last post by:
Discovered this interesting comment on MSDN: "To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI) Win32_PhysicalMedia (a class) property SerialNumber." I'm sorry to admit it bit I am really undereducated on how to incorporate some of the Windows SDK...
9
20687
by: Nebojsa4 | last post by:
Hi. First, sorry on my weak English to all. Qusetion: How to read (in VB) Manufacturer serial number of Hard disk drive? Not volume/serial number of C:, D:, etc. partitons. For reading volume/serial number of hard disk C: etc, You can use Microsoft Scripting Runtime (in VB):
7
4574
by: Udara chathuranga | last post by:
what is the java script source code to find the serial number of a date of a year.
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.