This function writes data to the ADU RS232 pipe. The number of bytes written is returned in lpNumberOfBytesWritten.
The handle value must be the value returned by the open call.
ADU RS232 data blocks are limited to 40 characters in length.
int __stdcall WriteAdu232(void * hDevice,
const void * lpBuffer,
unsigned long nNumberOfBytesToWrite,
unsigned long * lpNumberOfBytesWritten,
unsigned long iTimeout);
Declare Function WriteAdu232 Lib "AduHid.DLL" _
(ByVal aduHandle As Long, ByVal lpBuffer As String, _
ByVal lNumberOfBytesToWrite As Long, _
ByRef lBytesWritten As Long, ByVal iTimeout As Long) As Long
A non-zero iTimeout value can only be supplied if timeout processing was activated during
the open call. (ie. a non-zero iTimeout value was passed into the open function)
Note: call GetLastError to get more information about a failed write operation.