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.

Syntax

LJM_ERROR_RETURN LJM_Close(int Handle)

Parameters

Handle [in]

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

Returns

LJM errorcode or 0 for no error.

Remarks

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.

Example

Close an already opened LabJack device connection

C
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.