I have a particular embedded device connected via USB to a PC. The device
has a (removable) SD-card. When connecting the device to a PC the SD-card
will appear as a hard disk when connected to a PC (accomplished with an
embedded USB driver in the device, that I don’t write myself).
On my PC for instance, the SD card will appear as “F:”, but on some other
machine it could of course be any other drive letter.
Now I want a PC application that accesses files on that partition (in
practice there will always be exactly one FAT16 partition on the SD-card).
How can I from the PC application find out the drive letter(s) in use??
It’s not sufficient to go through all drive letters and see if it’s
“removable” (with GetDriveType()), since there could be several other
removable drives on a computer.
The device actually has a unique USB identifier (not sure about the
terminology) that I want to look at. Given that USB identifier (friendly
name, vendor name, or whatever it’s called…) I want to see enumerate
partitions that exists on the mounted SD card.
This must work on Windows 98, Windows XP and Windows 2000 (preferably with
the same code)
I guess there’s some way to do this via the setup API, but I don’t really
know how. Any advice on how to proceed with this are appreciated.
Thanks in advance.