
Document Reference No.: ES_000010
USB2-F-7x01 Programming Guide
Version 1.01
Clearance No.: ES# 27
©2009-2010 EasySync Ltd. 5
2.2 High-Level language API
2.2.1 canplus_getFirstAdapter
Summary
Search the system for available USB2-F-7x01 adapters.
Definition
int canplus_getFirstAdapter ( char *szAdapter, int size );
Parameters
szAdapter pointer to the serial number of the first USB2-F-7x01 found
size size of the buffer to receive the serial number
Remarks
The serial number is a string consisting of 8-bytes plus null termination. Allocate a 9 byte buffer
to obtain the serial number.
Adapter detection may need to be done on a separate thread or process if it is likely that the
USB2-F-7x01 adapters are installed and/or removed after the device driver has been loaded.
Return Codes
>0 Number of USB2-F-7x01 adapters found
<= 0 Error as noted below:
ERROR_CANPLUS_MEMORY_ERROR
If szAdapter buffer size (size variable) is less than 9B
ERROR_CANPLUS_FAIL
Unable to get information about adapters
ERROR_CANPLUS_NO_DEVICE
No devices found
Comentarios a estos manuales