Skip to main content
Skip table of contents

Close [LJM User's Guide]

Closing a handle will remove the associated device connection from the LJM library, free the device to be opened again, and free allocated system resources.


LJM_ERROR_RETURN LJM_Close(int Handle)


Handle [in]

A device handle. The handle is a connection ID for an active device. Generate a handle with LJM_Open, or LJM_OpenS.


LJM errorcode or 0 for no error.


LJM_Close is useful when multiple LabJack device connections are open and only a single connection needs to be closed. Use LJM_CloseAll to close every device in a single function call.


Close an already opened LabJack device connection

int LJMError;
//handle from LJM_Open()
LJMError = LJM_Close(handle);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.