Question : how to determine if a given device is on a USB port

I want to poll all the USB port on a system and determine if a given device is attached and active and if so, which port it is on.

How do I do this?

Answer : how to determine if a given device is on a USB port

I've got a article (with VB.Net source code examples) on how to get the serial number from a USB flash disk.... you might find it interesting as it shows how to enumerate the USB controllers, hubs, ports, and devices.

http://www.emmet-gray.com/Articles/USB_SerialNumbers.htm

There is a related C# source code example (at the bottom of that link) for a USB_View utility that performs the same kinds of things as a class module that you could compile separately and use in your VB project.

Random Solutions  
 
programming4us programming4us