User Manual

ADC-20/ADC-24 User's Guide 24
Copyright © 2005-2010 Pico Technology Ltd. All rights reserved. adc20.en
5.4.8
HRDLGetUnitInfo
short HRDLGetUnitInfo (
short handle,
char * string,
short stringLength,
short info )
This function writes information about the data logger to a character string. If the
logger fails to open, only info = HRDL_ERROR (7) is available to explain why the last
open unit call failed. When retrieving the driver version, the handle value is ignored.
Arguments
handle
Handle to the device from which information is required. If an invalid
handle is passed, the error code from the last unit that failed to open
is returned (as if info = HRDL_ERROR), unless info =
HRDL_DRIVER_VERSION and then the driver version is returned.
string
Pointer to the character string buffer in the calling function where the
unit information string (selected with info) will be stored. If a null
pointer is passed, no information will be written.
stringLength
Length of the character string buffer. If the string is not long enough
to accept all of the information, only the first stringLength
characters are returned.
info
Enumerated type (listed below) specifying what information is
required from the driver.
Returns
The length of the string written to the character string buffer, string, by the
function.
If one of the parameters is out of range, or a null pointer is passed for string, the
function will return zero.
Values of info
info
Description
Example
HRDL_DRIVER_VERSION (0)
The version of PicoHRDL.dll
1.0.0.1
HRDL_USB_VERSION (1)
The type of USB to which the unit is
connected
1.1
HRDL_HARDWARE_VERSION (2)
The hardware version of the HRDL
attached
1
HRDL_VARIANT_INFO (3)
Information about the type of HRDL
attached
24
HRDL_BATCH_AND_SERIAL (4)
Batch and serial numbers of the
unit
CMY02/116
HRDL_CAL_DATE (5)
Calibration date of the unit
09Sep05
HRDL_KERNEL_DRIVER_VERSION (6)
Kernel driver version
HRDL_ERROR (7)
One of the error codes listed in
Error codes below
4
HRDL_SETTINGS_ERROR (8)
One of the error codes listed in
Setting Error Codes below