WORD joyGetNumDevs()
This function returns the number of joystick devices supported by the system.
None
Returns the number of joystick devices supported by the joystick driver. If no driver is present, the function returns zero.
Use joyGetPos to determine whether a given joystick is actually attached to the system. The joyGetPos function returns a JOYERR_UNPLUGGED error code if the specified joystick is not connected.
joyGetDevCaps, joyGetPos