GetCommanderCount 

Description

Retrieves the number of Commander devices currently recognized by the host system.

The number of devices is represented in the return value. The function returns -1 if no devices are connected. This function shows that the Commander core is correctly recognized by the host.

Arguments

None  

This function does not accept any parameters.


Return Value

Type: Int


Value

Meaning

-1

No recognized device

η

η devices were recognized (general case for multiple devices)

Examples

  • Visual C (VC)

int numDev;                                //  The number of devices

numDev = GetCommanderCount();        //  Obtain the number

 of devices connected to the host


  • Visual Basic (VB)

Dim numDev as Integer                        ‘  The number of devices

numDev = GetCommanderCount()        ‘  Obtain the number of

 devices connected to the host


  • C/C++

int numDev = GetCommanderCount();


if (numDev == 0) {                   // No recognized device

} else if (numDev == 1) {            // One device recognized

} else {                             // numDev devices recognized

}


  • Python

example


  • WPF (C#)

example


  • Winforms (C#)

example


V 1.0 Function: GetCommanderHIDnumber()


REPOSITORY PLACEHOLDER LINK


< Previous | Topic Home | Home |  Next  >