ADU  Series - USB Data Acquisition Interface SDK 

OpenAdu232

This functions searches for any ADU device attached to the computer. The function opens the first ADU device that it encounters 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 "first" in this context does not necessarily reflect the order that the devices were plugged in. "First" means the first one encountered in the internal list maintained by the Windows operating system.

If more than 1 ADU device is connected to the personal computer then use OpenAdu232ByProductId or OpenAdu232BySerialNumber instead of OpenAdu232.

C Declaration:

void * __stdcall OpenAdu232(unsigned long iTimeout);

Visual Basic Declaration:

Declare Function OpenAdu232 Lib "AduHid.DLL" _
(ByVal iTimeout As Long) As Long

Arguments:

Argument Type Value Description
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