2.5.5 - RegisterDeviceReconnectCallback | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver

Tuesday April 7th, 2020
Support: LabJack engineers available through email and chat.
Shipping: We are processing and shipping all orders.
Stock: 55/56 products in stock. More details.
Supply Chain: Some disruptions. More details.

2.5.5 - RegisterDeviceReconnectCallback

Sets a callback that is called by LJM after the device is found to be disconnected (resulting in a read/write error) and the device is then reconnected.


typedef void (*LJM_DeviceReconnectCallback)(int);
LJM_ERROR_RETURN LJM_RegisterDeviceReconnectCallback(
                int Handle, 
                LJM_DeviceReconnectCallback Callback)


Handle [in]
A device handle. The handle is a connection ID for an active device. Generate a handle with LJM_Open or LJM_OpenS.
Callback [in]
The callback function which will receive the device Handle as a parameter.


LJM errorcodes or 0 for no error.


For more information on device reconnection, see "2.1 - Opening and Closing".

To disable the previous callback for reconnection, pass 0 or NULL as Callback.

LJM_RegisterDeviceReconnectCallback may not be called from within a LJM_DeviceReconnectCallback.