Partager via


LPGET_DESCRIPTOR (Compact 2013)

3/26/2014

This function sends a GET_DESCRIPTOR request to a universal serial bus (USB) device.

Syntax

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

Parameters

  • hDevice
    [in] Handle to a USB device.
  • lpStartAddress
    [in] Pointer to the address of a callback routine of type LPTRANSFER_NOTIFY_ROUTINE, or NULL if no callback routine is necessary.
  • 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 a descriptor.
  • wLanguage
    [in] Language IDENTIFIER for string descriptors, zero (0) for others.
  • wLength
    [in] Size of the buffer.
  • lpvBuffer
    [in] Pointer to a buffer for descriptor data.

Return Value

A USB_TRANSFER handle indicates success. NULL indicates failure.

Remarks

This function initiates a control transfer to a USB device requesting device descriptor information. The device returns the contents of the device descriptor, starting at the index specified.

Requirements

Header

usbdi.h

See Also

Reference

USB Driver Functions
LPABORT_TRANSFER
LPGET_TRANSFER_STATUS
LPIS_TRANSFER_COMPLETE
LPTRANSFER_NOTIFY_ROUTINE
LPSET_DESCRIPTOR