views:

1125

answers:

3

Is there an easy way to get the serial number of all the hard disks in a PC using the Win32 API?

+5  A: 

look here

Fredou
+1  A: 

GetVolumeInformation is your friend.

Edouard A.
GetVolumeInformation() will only give you the serial no of the volume. Disk volume != hard disk. The volume serial is typically just a 32-bit timestamp from when the disk was formatted.
Andreas Magnusson
You are correct.
Edouard A.
A: 

It's a Win32 FAQ See news://comp.os.ms-windows.programmer.win32 for the right method