-
Notifications
You must be signed in to change notification settings - Fork 1
HW identification
Windows uses Device instance ID strings to identify individual HW devices. Device instance IDs are expressed as text strings in the following format <bus-prefix>\<
device-ID
>\<
instance-ID
>
.
Windows also uses device interface paths or symbolic link name of an interface instance on the following format \\?\hid#vid_vvvv&pid_pppp&mi_mm#ssss#{gggggggg-gggg-gggg-gggg-gggggggggggg}
where vvvv
is the vendor ID, pppp
is product ID, ssss
is the USB serial string and gggg...
is the device interfacce GUID. This string can be passed by CreateFile
to connect to the device. Sources: CM_Get_Device_Interface_ListW Buffer argument, SP_DEVICE_INTERFACE_DETAIL_DATA_W::DevicePath, Windows USB Device Path.
Warning from Microsoft: "Device identification strings should not be parsed. They are meant only for string comparisons and should be treated as opaque strings.
Device tree view of multiple USB devices of the same type (Logitech HD Webcam C525):
The "USB Composite Device" represents the physical Webcam device, whereas the child devices are virtual devices for the individual functions offered.
Device #1:
- Composite dev:
USB\VID_046D&PID_0826\9DC49FA0
- Speaker:
USB\VID_046D&PID_0826&MI_00\6&1AC65CD4&0&0000
- Mic:
SWD\MMDEVAPI\{0.0.1.00000000}.{0F5AE081-BE5E-4B63-8153-1F0B0729AD1E}
- Mic:
- Webcam:
USB\VID_046D&PID_0826&MI_02\6&1AC65CD4&0&0002
- Speaker:
Device #1:
- Composite dev:
USB\VID_046D&PID_0826\03857B50
- Speaker:
USB\VID_046D&PID_0826&MI_00\6&D2A3B0F&0&0000
- Mic:
SWD\MMDEVAPI\{0.0.1.00000000}.{9F1F4B71-D3A6-492B-B152-C579479BEB04}
- Mic:
- Webcam:
USB\VID_046D&PID_0826&MI_02\6&D2A3B0F&0&0002
- Speaker:
Interpretation:
-
USB
: Universal Serial Bus device type (can also beHID
,PCI
orSWD
) -
VID_046D
: Vendor Logitech inc. -
PID_0826
: Product HD Webcam C525 -
MI_00
: Multiple Interface index (to separate speaker vs. camera function) -
\<serial>
: Instance ID to distinguish devices of the same type
- PnP Device Tree - can be viewed in "Device Manager" by switching to "Devices by connectivity" view.
-
Standard USB identifiers documents the
USB\VID_v(4)&PID_d(4)&MI_z(2)
identifier. -
HIDClass Hardware IDs for Top-Level Collections documents the
HID\Vid_v(4)&Pid_d(4)&MI_z(2)&Colb(2)
format.