SLAA453A january 2011 – may 2023
Description
Sends bufferSize bytes of data stored in buffer to the HID device designated by pstrHidDevice.
This function sends the data using HID reports as "packets". If any of the attempts to send a HID report times out, then the function returns HID_DEVICE_TRANSFER_TIMEOUT.
There is no inherent limit to the number of bytes that can be sent, other than the limitation imposed by bufferSize being a DWORD value. Packetization is handled automatically.
Parameters
strHidDevice* pstrHidDevice | The structure containing the HID device information. |
BYTE* buffer | An array of data to be sent |
DWORD bufferSize | Number of bytes to be sent, starting from address buffer. |
DWORD bytesSent | Number of bytes actually sent (in the event of an error) |
returns | HID_DEVICE_NOT_OPENED. The HID device failed to open. |
HID_DEVICE_TRANSFER_TIMEOUT. A report request timed out. | |
HID_DEVICE_TRANSFER_FAILED. The transmission failed for unspecified reasons. | |
HID_DEVICE_SUCCESS. All the data was successfully sent. |