I'm writing a little program that needs to work with removable media... That would be things like USB drives, memory (Flash, CF, SD, etc.), and FireWire drives. Basically anything that can be connected to a computer while it's on, have Windows identify the device, install the drivers, and assign a drive letter to the device.

What I need to do is be able to do is catch such an event, get information about it - what drive letter did windows give it, and also some kind of identification that would separate one device from any other (some serial number maybe?). How could I go about doing this? Would love to see some code for this, but even some reference material would be fine. Please let me know. Thanks.