OpenAdu232BySerialNumber
This functions searches for any ADU device attached to the computer that matches the
serial number. The function opens the first ADU device that matches and passes back a
handle to it.
The handle value must be retained by the calling program and used with all subsequent
ReadAdu232, WriteAdu232 and CloseAdu232 function calls.
Note that the serial number of a ADU device is unique so only one device will match.
C Declaration:
void * __stdcall OpenAdu232BySerialNumber(const char* psSerialNumber,
unsigned long iTimeout);
Visual Basic Declaration:
Declare Function OpenAdu232BySerialNumber Lib "AduHid.DLL" _
(ByVal sSerialNumber As String, _
ByVal iTimeout As Long) As Long
Arguments:
Argument |
Type |
Value |
Description |
psSerialNumber |
char * |
non 0 |
pointer to serial number string |
iTimeout |
unsigned long |
0 |
timeouts disabled |
other |
timeout processing enabled |
Any non-zero iTimeout value will enable timeout handling. The actual timeout period is
passed into the ReadAdu232 and WriteAdu232 function calls.
Return Codes:
Value |
Description |
INVALID_HANDLE_VALUE |
pipe was not opened |
0 |
pipe was not opened |
other |
Handle to the ADU RS232 pipe |
|