Compartir a través de


USBDeviceAttach (Windows CE 5.0)

Send Feedback

This function is a universal serial bus (USB) device attach routine. It passes a table of functions to USB client drivers. USB host client drivers must implement this function.

BOOLUSBDeviceAttach(USB_HANDLEhDevice,LPCUSB_FUNCSlpUsbFuncs,LPCUSB_INTERFACElpInterface,LPCWSTRszUniqueDriverId,LPBOOLfAcceptControl,LPCUSB_DRIVER_SETTINGSlpDriverSettings,DWORDdwUnused);

Parameters

  • hDevice
    [in] Handle to a USB device.
  • lpUsbFuncs
    [in] Pointer to a USB device interface function table.
  • lpInterface
    [in] Pointer to the USB_INTERFACE structure that contains interface information if a client is loaded as an interface driver. If a client is not loaded for a specific interface, this parameter is NULL, and the client can get interface information through the LPFIND_INTERFACE function.
  • szUniqueDriverId
    [in] Client driver identifier string.
  • fAcceptControl
    [out] Indicator if the driver accepts control of the device or if the driver should continue to try to load client drivers. Set to TRUE if the driver accepts control of the device or FALSE if the USB driver should continue to try to load client drivers.
  • lpDriverSettings
    [in] Pointer to the USB_DRIVER_SETTINGS structure that indicates how the driver is loaded.
  • dwUnused
    [in] Reserved for use with future versions of USB driver.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

The USB driver module calls this function when a device is attached and a matching registry key is found in the LoadClients registry key. The driver should determine whether it can control the device. It and must load drivers for any uncontrolled interfaces on the device.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Usbdi.h.

See Also

LPFIND_INTERFACE | LPLOAD_GENERIC_INTERFACE_DRIVER | USB_DRIVER_SETTINGS | USB_INTERFACE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.