Language
|
Description
|
C/C++
|
BOOL UsbVendorRequestIn(IN USB_DEVICE_HANDLE hUsb,
| IN RDUSB_REQUEST_RECIPIENT RequestRecipient,
|
| IN DWORD nNumberOfBytesToTransfer,
|
| OUT LPDWORD lpNumberOfBytesTransfered);
|
|
Delphi
|
function UsbVendorRequestIn(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 UsbVendorRequestIn (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
| Specifies device handle. This handle can be obtained with OpenRapidUsb.
|
| Specifies recipient of vendor 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 vendor.
|
| Specifies vendor-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
|
| UsbVendorRequestIn 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
| UsbVendorRequestIn is called to issue a vendor-specific command to a device, interface, endpoint or other device-defined target. Transfer direction is from device to host (IN).
|
|