
Document Reference No.: ES_000010
USB2-F-7x01 Programming Guide
Version 1.01
Clearance No.: ES# 27
©2009-2010 EasySync Ltd. 6
2.2.2 canplus_getNextAdapter
Summary
Search the system for available USB2-F-7x01 adapters. A call to “canplus_getFirstAdapter” is
required prior to accessing this call. Repeat this call for each adapter.
Definition
int canplus_getNextAdapter ( char *szAdapter, int size );
Parameters
szAdapter pointer to the serial number of the next 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 ERROR_CANPLUS_OK
<= 0 Error as noted below:
ERROR_CANPLUS_MEMORY_ERROR
If szAdapter buffer size (size variable) is less than 9 Bytes
ERROR_CANPLUS_FAIL
canplus_getFirstAdapter was not called.
ERROR_CANPLUS_NO_DEVICE
No devices found
Comentarios a estos manuales