3.1.4 GetCommanderID
GetCommanderID
Overview
Obtains the device name string of a Commander core device by its index number within the detected number of devices. The first detected device is indexed as 0, the second as 1, and so on. Returns 1 if successful, 0 if unsuccessful.
Argument
number
Type: Int
Specifies the index number of the device to be retrieved.
name
Type: char*
Pointer to a character buffer that receives the device name.
Device Name Format: CMD-4CR-xx Where xx is the Identification Number(ID) of the device.
Reply
Type: Int
|
Value |
Meaning |
|
0 |
Send/Receive failed |
|
1 |
Send/Receive success |
|
Other (negative) |
Host communication failed (see Communication Error Codes) |
Examples
- Visual C (VC)
|
int result; // Function result char devName[16]; // Device name result = GetCommanderID(0, devName); // Obtain the device name |
- Visual Basic (VB)
|
Public devName As New String(“”, 15) ‘ Device name Dim result as Integer ‘ Function result result = GetCommanderID(0, devName); ‘ Obtain the device name |
- C/C++
|
|
- Python
|
example |
- WPF (C#)
|
example |
- Winforms (C#)
|
example |
V 1.0 Function: GetCommanderHIDName(int index, char* name)
REPOSITORY PLACEHOLDER LINK
< Previous | Topic Home | Home | Next >