![]() |
---|
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. |
All USB device drivers must expose certain entry points in their DLLs to interact properly with the USBD module. The following entry points not only enable the USBD module to connect a driver with its peripheral, but also enable a driver to create and manage any registry keys that it may need:
The USBD module calls this function when the USB device is connected to a host computer. The driver's implementation of this function can decline to control the device, in which case the USBD module attempts to find another driver to handle the device. A driver rarely declines to control a device, though it might under certain conditions. For example, the driver might decline to control the device if the driver can determine from the device configuration block that the device is newer than the driver. By doing so, the driver indirectly gives a user an opportunity to enter the name of the correct USB device driver DLL if Windows CE cannot locate another driver for the device. For more information, see USB Device Driver Attach Processing.
This function, which should only be called the first time that the USB device driver is loaded, allows the driver to create any registry keys that it needs. After USBInstallDriverhas done its work, the USBD module should subsequently be able to locate the USB device driver automatically. For more information on the format of these keys and how they are used to load USB device drivers, see USB Device Driver Load Process.
This function handles removing the driver from a Windows
CE–based platform. It is responsible for removing all registry keys
that were created by the driver's
USBInstallDriverfunction and for releasing any other
resources that are held by the driver. Currently, Windows CE never
actually calls this function directly, but various setup type
programs could do so. For more information, see
Removing USB Device
Drivers.
Last updated on Tuesday, July 13, 2004