Recover SD Card Serial Number in Windows XP / Vista / 7?

There is a manufacturer serial number on SD cards and there are several pages on the net that describe how to get them on different mobile devices (including this one ). But I need to get it under desktop Windows and the code that works for mobile Windows doesn't seem to be translated.

Q: how do you programmatically extract SD card maker serial number from SD card under Windows?

EDIT: From what I'm collecting this can be done using DeviceIoControl

IOCTL_SFFDISK_DEVICE_COMMAND

to send command 10 from the SD Card spec, but it's unreliable - it only works with some non-USB card readers and only some drivers for those readers ... This makes it useless for our purposes. Perhaps someone else can get some use from the information.

+2


source to share


1 answer


Well, you could do it using the SetupDiXXX API calls ( see this sample project code ), or if I'm not mistaken using WMI queries,

I'm not very versatile with WMI queries, but I'm sure there is a ton of information on the net.

Using the SetupDiXXX methods, you can query for existing devices of a specific class (you will have to look for the device class for SD cards) and then enumerate through the devices present on the computer with the manufacturer's serial number.



For help on the SetupDiXXX functions, see the following

0


source







All Articles