This functions searches for any ADU device attached to the computer that matches the product id. 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 ReadAduStream and CloseAduStream 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 with the same product id is connected then use OpenAduStreamBySerialNumber instead of OpenAduStreamByProductId.
void * __stdcall OpenAduStreamByProductId(int iProductId,
unsigned long iTimeout);
Declare Function OpenAduStreamByProductId Lib "AduHid.DLL" _
(ByVal iProductId As Long, _
ByVal iTimeout As Long) As Long
Any non-zero iTimeout value will enable timeout handling. The actual timeout period is
passed into the ReadAduStream function call.