次の方法で共有


LPSET_DESCRIPTOR (Compact 2013)

3/26/2014

This function sends a SET_DESCRIPTOR request to a universal serial bus (USB) device. It then initiates a control transfer to a USB device, which sets device descriptor information.

Syntax

typedef USB_TRANSFER (* LPSET_DESCRIPTOR)(
  USB_HANDLE hDevice,
  LPTRANSFER_NOTIFY_ROUTINE lpStartAddress,
  LPVOID lpvNotifyParameter, 
  DWORD dwFlags, 
  UCHAR bType, 
  UCHAR bIndex, 
  WORD wLanguage,
  WORD wLength,
  PVOID lpvBuffer
);

Parameters

  • hDevice
    [in] Handle to a USB device.
  • lpvNotifyParameter
    [in] Pointer to the parameter to pass to a callback routine.
  • dwFlags
    [in] Value of USB_NO_WAIT or zero (0).
  • bType
    [in] Descriptor type. Set to USB_DEVICE_DESCRIPTOR_TYPE, USB_CONFIGURATION_DESCRIPTOR_TYPE, USB_STRING_DESCRIPTOR_TYPE, or a vendor specific value.
  • bIndex
    [in] Index within the descriptor.
  • wLanguage
    [in] Language identifier for string descriptors; zero (0) for others.
  • wLength
    [in] Descriptor length.
  • lpvBuffer
    [in] Buffer for descriptor data.

Return Value

A USB_TRANSFER handle indicates success. NULL indicates failure.

Requirements

Header

usbdi.h

See Also

Reference

USB Driver Functions
LPABORT_TRANSFER
LPGET_DESCRIPTOR
LPGET_TRANSFER_STATUS
LPIS_TRANSFER_COMPLETE
LPTRANSFER_NOTIFY_ROUTINE