3.1.5 OpenCommanderByID
Description
Opens a device to a Commander core device by its device id string. Returns 1 if successful, 0 if unsuccessful.
Call this to reestablish connection after disconnecting with the function CloseCommander.
Arguments
pHandle
Type: CommanderDeviceHandle*
Pointer to a device‑handle variable.
Receives the opened device handle if the function succeeds.
id
Type: char*
Device id string.
The device id string is obtained using GetCommanderID.
Return Value
Type: Int
|
Value |
Meaning |
|
0 |
Failure |
|
1 |
Success |
|
Other (negative) |
Host communication failed (see Communication Error Codes) |
Examples
- Python
|
api = DLLInterface() # Open Commander by ID index = 0 id = ctypes.create_string_buffer(64) return = api.dll.GetCommanderID(index, id) if return: print(f"Device{index} ID: {id}") handle = c_void_p() return = api.dll.OpenCommanderByID(ctypes.byref(handle), id) if return: print(f"Device{index} is Opened") |
V 1.0 Function: OpenCommanderHID(HANDLE* pHandle, char* name)
REPOSITORY PLACEHOLDER LINK
< Previous | Topic Home | Home | Next >