windows – How to enumerate all connected USB devices’ device path?

MSDN says that there’s a generic USB device interface class named GUID_DEVINTERFACE_USB_DEVICE with the GUID {A5DCBF10-6530-11D2-901F-00C04FB951ED}:

The system-supplied USB hub driver registers instances of GUID_DEVINTERFACE_USB_DEVICE to notify the system and applications of the presence of USB devices that are attached to a USB hub.

Here’s a code example that seems to do what you want to do, using the DEVINTERFACE_USB_DEVICE GUID.

Leave a Comment