3.1.7 CloseCommander
CloseCommander
Overview
Closes a CommanderDeviceHandle* previously opened on a Commander core device. The device cannot be used for communication once this function is called. Returns 1 if successful, 0 if unsuccessful.
Recommended: Close all devices when you end the program.
Argument
pHandle
Type: CommanderDeviceHandle*
Pointer to a device‑handle variable.
Receives the opened device handle if the function succeeds.
The device name string is obtained using GetCommanderName.
Reply
Type: Int
|
Value |
Meaning |
|
0 |
Send/Receive failed |
|
1 |
Send/Receive success |
|
Other (-value) |
Host communication failed (see Communication Error Codes) |
Examples
- Visual C (VC)
|
int result; // Function result HANDLE devHandle; // Device handle result = CloseCommander (devHandle); // Close the handle |
- Visual Basic (VB)
|
Public devHandle As Integer ‘ Device handle Dim result as Integer ‘ Function result result = CloseCommander (devHandle); ‘ Close the handle |
- C/C++
|
example |
- Python
|
example |
- WPF (C#)
|
example |
- Winforms (C#)
|
example |
V 1.0 Function: CloseCommanderHID(HANDLE* pHandle)
REPOSITORY PLACEHOLDER LINK
< Previous | Topic Home | Home | Next >