Jungo WinDriver  
Official Documentation

◆ WDU_Transfer()

DWORD DLLCALLCONV WDU_Transfer ( _In_ WDU_DEVICE_HANDLE  hDevice,
_In_ DWORD  dwPipeNum,
_In_ DWORD  fRead,
_In_ DWORD  dwOptions,
_In_ PVOID  pBuffer,
_In_ DWORD  dwBufferSize,
_Outptr_ PDWORD  pdwBytesTransferred,
_In_ PBYTE  pSetupPacket,
_In_ DWORD  dwTimeout 
)

Transfers data to/from a device.

Parameters
[in]hDeviceA unique identifier for the device/interface.
[in]dwPipeNumThe number of the pipe through which the data is transferred.
[in]fReadTRUE for read, FALSE for write.
[in]dwOptionsCan be a bit-mask of any of the following options: USB_ISOCH_NOASAP - For isochronous data transfers. Setting this option instructs the lower driver (usbd.sys) to use a preset frame number (instead of the next available frame) while performing the data transfer. Use this flag if you notice unused frames during the transfer, on low-speed or full-speed devices (USB 1.1 only) and on Windows only. USB_ISOCH_RESET - Resets the isochronous pipe before the data transfer. It also resets the pipe after minor errors, consequently allowing the transfer to continue. USB_ISOCH_FULL_PACKETS_ONLY - When set, do not transfer less than packet size on isochronous pipes. USB_BULK_INT_URB_SIZE_OVERRIDE_128K - Limits the size of the USB Request Block (URB) to 128KB.
[in]pBufferlocation of the data buffer
[in]dwBufferSizeNumber of the bytes to transfer.
[out]pdwBytesTransferredNumber of bytes actually transferred.
[in]pSetupPacket8-bytes packet to transfer to control pipes.
[in]dwTimeoutMaximum time, in milliseconds, to complete a transfer. Zero = infinite wait.
Returns
WinDriver Error Code
DWORD dwSize = 0x100, dwPipeNum = 0;
DWORD dwBytesTransferred;
PVOID pBuffer = malloc(dwSize);
BYTE SetupPacket[8];
WDU_Transfer(hDevice, dwPipeNum, MENU_RW_READ_PIPE, 0, pBuffer, dwSize,
&dwBytesTransferred, SetupPacket, TRANSFER_TIMEOUT);
void *__cdecl malloc(unsigned long size)
DWORD DLLCALLCONV WDU_Transfer(_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPipeNum, _In_ DWORD fRead, _In_ DWORD dwOptions, _In_ PVOID pBuffer, _In_ DWORD dwBufferSize, _Outptr_ PDWORD pdwBytesTransferred, _In_ PBYTE pSetupPacket, _In_ DWORD dwTimeout)
Transfers data to/from a device.
unsigned char BYTE
Definition: windrvr.h:332