Enumerating Removable media?

Hi guys

I'm stuck on a piece of code, I want to get the address of any removable media (Including USB HDD and Thumb drives). I've tried GetDriveType() and that doesn't pick my USB HDD as type 2, only type 3.

How can I find out if the drive is removable or not?
Yeah, I had that problem too. I ended up adding fixed drives to my removable drives collection if the interface was USB or FireWire. There was no external SATA back then so I am unsure how the interface is listed for these. I think I used WMI for this task.
I checked WMI and I can't seem to get it to work, is there any way?

If someone has a good example of using SetupDiGetClassDevs() to get the drive's class to see if it's removable or not, i'd be very appreciative.
Topic archived. No new replies allowed.