|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
The USBD module takes the following steps when loading drivers, stopping as soon as it finds a driver that accepts control of the device. The following rules describe the algorithm that the USBD module uses to search for USB device drivers. In the descriptions, Group X_IDrefers to a key with the specified group set to one of the forms described in Registry Keys for USB Device Driversand the remaining groups set to Default. If multiple drivers are registered within the same group, the one that contains the simplest form is loaded first. For example, a driver specifying a Group1_IDwith device class code only, such as Default\ DeviceClass\Default, loads before a driver specifying a Group1_IDwith device class and subclass code, such as Default\ DeviceClass_Subclass\Default. This allows Windows CE to conserve resources by loading as few drivers as possible. This procedure takes the following steps:
The searches in steps 1 through 3 may not yield a matching USB device driver to control the device as a whole; that is, the device may have multiple interfaces, but no driver identified in steps 1 through 3 may match all of the interfaces present on the device. If so, the USBD module takes the following steps to search for matching drivers for each interface present on the device, searching for the most general Group3_IDsubkey. If the USBD module finds a matching subkey, it loads the driver listed within the subkey's DriverName\DLLsubkey.
Finally, if no appropriate USB device driver is located, the USBD module prompts a user to enter the name of a DLL containing the correct driver. The USBD module then loads the driver and calls the driver's USBInstallDriverfunction. USBInstallDrivershould create an appropriate subkey for the driver by calling the RegisterClientSettingsfunction so the next time that the USB device is attached, the USBD module can locate the correct driver without prompting a user.
In some cases it may be necessary to specify the precedence order to a greater level of detail; for example, combining vendor- and device-class specifiers. In these cases, the Group X_IDvalues may be combined to generate other combinations. The precedence for such combinations is as follows, in descending order:
If multiple drivers are registered at a particular precedence level, the USBD module loads the one with the most general form.
Last updated on Tuesday, July 13, 2004