Language
|
Description
|
C/C++
|
BOOL UsbGetEndpointDescriptor(IN USB_DEVICE_HANDLE hUsb,
| OUT PUSB_ENDPOINT_DESCRIPTOR pEndDescr);
|
|
Delphi
|
function UsbGetEndpointDescriptor(hUsb : USB_DEVICE_HANDLE;
Index : UCHAR;
InterfaceIndex : UCHAR;
AlternateIndex :UCHAR;
var EndDescr : USB_ENDPOINT_DESCRIPTOR) : BOOL; stdcall;
|
VB
|
Function UsbGetEndpointDescriptor (ByVal hUsb As Long, _
ByVal EndpointIndex As Byte, _
ByVal MainIndex As Byte, _
ByVal AlternateIndex As Byte, _
ByRef pDesc As USB_ENDPOINT_DESCRIPTOR) As Boolean
|
Parameters
| Specifies handle to USB device.
|
| Endpoint descriptor index.
|
| Index of interface containing endpoint descriptor.
|
| Index of alternate settings.
|
| Speicifies pointer to endpoint descriptor.
|
Description
| Use this function to retrieve endpoint descriptor. This function can be used only after getting valid handle from OpenRapidUsb function.
|
Example
// open first RapidUSB device
USB_HANDLE hUsb = OpenRapidUsb(0);
USB_ENDPOINT_DESCRIPTOR EndDesc;
// getting second endpoint descriptor from first interface
if (UsbGetEndpointDescriptor(hUsb, 0, 0, 1, &EndDesc))
// Descriptor retrieved successfully
else
// Error! Check if hUsb and Index are valid
CloseRapidUsb(hUsb);
|