Language
|
Description
|
C/C++
|
BOOL UsbClassRequestIn(IN USB_DEVICE_HANDLE hUsb,
| IN RDUSB_REQUEST_RECIPIENT RequestRecipient,
|
| IN const LPVOID lpBuffer,
|
| IN DWORD nNumberOfBytesToTransfer,
|
| OUT LPDWORD lpNumberOfBytesTransfered);
|
|
Delphi
|
function UsbClassRequestIn(hUsb : USB_DEVICE_HANDLE;
RequestRecipient : RDUSB_REQUEST_RECIPIENT;
ReservedBits : UCHAR;
Request : UCHAR;
Value : USHORT;
Index : USHORT;
var Buffer;
nNumberOfBytesToTransfer : DWORD;
var lpNumberOfBytesTransfered : DWORD): BOOL; stdcall;
|
VB
|
Function UsbClassRequestIn (ByVal hUsb As Long, _
ByVal RequestRecipient As Byte, _
ByVal ReservedBits As Byte, _
ByVal Request As Byte, _
ByVal Value As Integer, _
ByVal Index As Integer, _
ByRef Buffer As Any, _
ByVal NumberOfBytesToTransfer As Long, _
ByRef NumberOfBytesTransfered As Long) As Boolean
|
Parameters
| Device handle. This handle can be obtained with OpenRapidUsb.
|
| Specifies recipient of feature request.
|
| Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request.
|
| Specifies USB-defined request code for the RequestRecipient.
|
| Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the RequestRecipient. This value is defined by the creator of the code used in Request.
|
| Specifies the device-defined index, returned by a successful configuration request, if the request is for an endpoint or interface. Otherwise, Index must be zero.
|
| Output parameter. Pointer to buffer for the transfer. This buffer will contain data read from the device.
|
| Specifies the length, in bytes, of the buffer specified in lpBuffer.
|
| lpNumberOfBytesTransfered
|
| UsbClassRequestIn returns the number of bytes read from device in this parameter.
|
Return Value
| If function fails it return FALSE. To detect error call GetLastError function.
|
Description
| UsbClassRequestIn is called to issue a class-specific command to a device, interface, endpoint or other device-defined target. Transfer direction is from device to host (IN).
|
|