tags:

views:

445

answers:

1

What's the best way of mapping out where all the USB drives are plugged in? Ideally, I'd like to be able to recursively start from the root hub and keep going down the tree finding connect usb drives and what port they are connected to (which physical USB slot).

A: 

In my case this is combination of kernel and user mode code that make life easier, but I'm sure that you can do all this only in user mode using SetupDiXXX Api's.
I think that USBView application using different approach. You can see the example implementation of USBView utility (C#) here
In general google for USBView and you will find a lot of relevant information.

Ilya
C#? Last I checked the usbview sample was C++.
Ben Voigt