Language
|
Description
|
C/C++
|
BOOL UsbGetDescriptor(IN USB_DEVICE_HANDLE hUsb,
| IN RDUSB_REQUEST_RECIPIENT RequestRecipient,
|
| OUT PUSB_COMMON_DESCRIPTOR pDescr,
|
| IN ULONG DescriptorLength);
|
|
Delphi
|
function UsbGetDescriptor(hUsb : USB_DEVICE_HANDLE;
RequestRecipient : RDUSB_REQUEST_RECIPIENT;
DescrType : UCHAR;
Index : UCHAR;
var Descr : USB_COMMON_DESCRIPTOR;
Length : ULONG) : BOOL; stdcall;
|
VB
|
Function UsbGetDescriptor(ByVal hUsb As Long, _
ByVal RequestRecipient As Byte, _
ByVal bType As Byte, _
ByVal Index As Byte, _
ByRef pDescr As USB_COMMON_DESCRIPTOR, _
ByVal DescrLength As Long) As Boolean
|
Parameters
| Specifies handle to USB device.
|
| Specifies recipient of get descriptor request.
|
| Indicates what type of descriptor is being retrieved.
|
| Pointer to user allocated memory block. Retrieved descriptor is saved to this buffer on function successful return.
|
| Specifies length of pDescr buffer.
| Return Value
| If function fails it return FALSE. To detect error call GetLastError function.
|
Description
| Use this function to retrieve descriptor of any type. This function can be used only after getting valid handle from OpenRapidUsb function. User must allocate memory buffer which points to pDescr before handling pointer parameter to function.
|
Note
| To get class specific descriptor (e.g. Hub descriptor class) use function UsbClassRequestIn.
|
|