Re: USB keyboard serial number? by Ali
Ali
Wed Dec 28 12:58:02 CST 2005
kd> !devnode 0 1
Refer to "Inside MS Windows 2000" by David A. Solomon and Mark E.
Rissinovich , Chapter 9 I/O Systems:
A record of all the devices detected since the system was installed is
recorded under the HKLM\SYSTEM\CurrentControlSet\Enum registry key.
Subkeys are in the form <Enumerator>\<Device ID>\<Instance ID>, where
the enumerator is a bus driver, the device ID is a unique identifier
for a type of device, and the instance ID uniquely identifies different
instances of the same hardware.
The answer to both these questions lies in the registry. When a bus
driver performs device enumeration, it reports device identifiers for
the devices it detects back to the PnP manager. The identifiers are
bus-specific; for a USB bus, an identifier consists of a vendor ID
(VID) for the hardware vendor that made the device and a product ID
(PID) that the vendor assigned to the device. (See the DDK for more
information on device ID formats.) Together these IDs form what Plug
and Play calls a device ID. The PnP manager also queries the bus driver
for an instance ID to help it distinguish different instances of the
same hardware. The instance ID can describe either a bus relative
location (for example, the USB port) or a globally unique descriptor
(for example, a serial number). The device ID and instance ID are
combined to form a device instance ID (DIID), which the PnP manager
uses to locate the device's key in the enumeration branch of the
registry (HKLM\SYSTEM\CurrentControlSet\Enum).