GetADU
( requires DLL V2.1 .0.0 or higher*)
This function returns one ADU Device ID from a list of connected
ADU devices based on a provided index number.
Note this function was created to accommodate Visual Basic
users. C / C++ users should use GetAduDeviceList, which conforms
to accepted design patterns.
Where an invalid index number is provided, GetADU will return an
ADU Device ID structure where each member is NULL.
C Declaration:
void __stdcall GetADU(ADU_DEVICE_ID* pAduDeviceId,
unsigned short iAduIndex,
unsigned long iTimeoutMillisec);
Visual Basic
Declaration:
Declare Function GetADU Lib "AduHid64.DLL" (ByRef pAduDeviceId
As ADU_DEVICE_ID,_
ByVal iIndex As Integer,_
ByVal iTimeout As Integer) As Integer
Arguments:
Argument |
Type |
Value |
Description |
pAduDeviceId |
ADU_DEVICE_ID* |
supply empty - this will
be populated by the
ADU driver |
Receives the ADU
device details at the
specified index |
iAduIndex |
unsigned short |
Numeric value between
0 and 31 (supplied by
caller) |
The index of the ADU
the caller wishes to
retrieve |
iTimeoutMillisec |
unsigned long |
0
Other |
timeouts disabled
timouts enabled |
Return Codes:
The return data for GetADU is stored within the pAduDeviceId
ADU_DEVICE_ID structure. If the supplied index (iAduIndex) was
valid, pAduDeviceId will contain the serial number and product
number of the ADU at the specified index. If there was no ADU
device at the specified index, pAduDeviceId will contain NULL
for the device serial number and NULL for the device product
number.
Visual Basic Example:
This example demonstrates the use of ADUCount in combination
with GetADU to step through all connected ADU devices:
Dim pADU As ADU_DEVICE_ID
For iAduIndex As Integer = 0 To ADUCount(100) - 1
GetADU(pADU, iAduIndex, 100)
‘Do something with pADU (Add it to a
list of ADUs?)
Next
*
Download both 32 and 64 bit DLL's and AduHidTest software
HERE ( 700K )
|