


InstanceID string, representing the uid for this particular device within the set of all instances with the same compatible id hooked up to the computer.įor any connected USB device you can see these strings using the Device Manager:.

CompatibleIDs string, representing USB device' Interface Class, Subclass and Protocol, and.DeviceID string, representing the USB Vendor and Product ID,.The PNP manager then asks the bus driver for device information by using a PNP request, asking for:.The PNP (Plug and Play) manager is informed that a device was added by the bus drivers.GetDescriptor(String iProduct), used in the "new Hardware been identified" popups.GetDescriptor(String iSerialNumber), used as Device Instance ID.(a more detailed description on what's in inf files can be found over on )Ī detailed look at the USB enumeration process (Use USB Logger): # vendor id (Vid) that Windows gets back during the # to your device, using the product id (Pid) and the # This is where windows learns to match this information "some usb dev"=OTHER_SECTION_DEV, USB\Vid_XXXX&Pid_yyyy Windows decides which xxx.sys to load based on the *.inf file that comes with the device's driver. Drivers come in the form of a compiled xxx.sys with xxx.inf file and is loaded to kernel space. Matching is done by comparing vendor id, product id and etc to inf files sections. When you insert a USB device, It sends low level USB request to the device and then based on the response from a device decides what driver to load. Windows uses a Plug and Play Architecture. Sorry if the above does not make sense at all since I am still in the learning stage and this is actually one of the exercise I think could help me learn about writing USB device drivers better. So, if I want to hijack the hardware enumeration process and creates my own virtual hardware, should I include a filter driver somewhere to intercept some IRPs related to the hardware enumeration process?

So far what I understand is the HIDClass driver (hidclass.sys) has a minidriver for the usb bus (hidusb.sys) that carries out the enumeration of attached USB hardware. Where do I start if I want to create a virtual USB device (for example, a virtual USB mouse which looks like a real USB mouse attached to a USB port) for testing/learning. I am a newbie learning how to write WDM device drivers for USB devices and found that the materials available are all too hard to comprehend (the DDK online doc is one of the most difficult to read, and the WDM Device driver book by Oney isn't anything better).
