Getting Hard Drive Serial Number
-
Hi, I want to get the manufacturer assigned serial number of hard disk. Please tell me how can i get using C++. I have tried to read the 4 bytes at 27h but it always gives the same number on all the hard disks. Kindly guide me in this regard. Your help will be highly appreciated. Thanks & Regards, Wasif Ehsan. :confused:
-
Hi, I want to get the manufacturer assigned serial number of hard disk. Please tell me how can i get using C++. I have tried to read the 4 bytes at 27h but it always gives the same number on all the hard disks. Kindly guide me in this regard. Your help will be highly appreciated. Thanks & Regards, Wasif Ehsan. :confused:
User the WMI class Win32_PhysicalMedia for getting this information.
« Superman »
-
User the WMI class Win32_PhysicalMedia for getting this information.
« Superman »
-
Hi, I want to get the manufacturer assigned serial number of hard disk. Please tell me how can i get using C++. I have tried to read the 4 bytes at 27h but it always gives the same number on all the hard disks. Kindly guide me in this regard. Your help will be highly appreciated. Thanks & Regards, Wasif Ehsan. :confused:
-
Hi, I want to get the manufacturer assigned serial number of hard disk. Please tell me how can i get using C++. I have tried to read the 4 bytes at 27h but it always gives the same number on all the hard disks. Kindly guide me in this regard. Your help will be highly appreciated. Thanks & Regards, Wasif Ehsan. :confused:
-
Naveen R wrote:
does GetVolumeInformation() is of any use to u?
i dont think it will help him. it will give the volume serial number that is given by the windows when u format the drive. the volume serial number is not a permanent one. it will change every time u format the drive. the volume serial number can be changed programatically . The Manufacturer's serial number can't be retrieved by
GetVolumeInformation()
. The manufacturer's serial number and model number is embedded in the Firmware of the disk. it is a permanent one and can't be changed programatically since it is kept in ReadOnly area of the disk. U can use WMI classes or even SMART (Self Monitoring Analysis And Reporting Technology)functions to retrive the serial number. Reading through the IO ports may be another method but its a very unreliable one i suppose. There are plenty of examples that are available on the net but the code is in VB. Use Google and see if u can get some examples in C++. Surely the link given by WhiteSky will help. Good Luckvijay.
-
Hi, I want to get the manufacturer assigned serial number of hard disk. Please tell me how can i get using C++. I have tried to read the 4 bytes at 27h but it always gives the same number on all the hard disks. Kindly guide me in this regard. Your help will be highly appreciated. Thanks & Regards, Wasif Ehsan. :confused:
-
What operating system is this for? If it is not for Windows then it would help to say so.
Sam Hobbs wrote:
If it is not for Windows then it would help to say so.
yes, Exactly. :)
Regards, vijay.