The joyGetNumDevs function queries the joystick driver for the number of joysticks it supports.

UINT joyGetNumDevs(VOID); 


This function takes no parameters.

Return Values

The joyGetNumDevs function returns the number of joysticks supported by the current driver or zero if no driver is installed.


Use the joyGetPos function to determine whether a given joystick is physically attached to the system. If the specified joystick is not connected, joyGetPos returns a JOYERR_UNPLUGGED error value.


**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.
**  Header:** Declared in Mmsystem.h; include Windows.h.
**  Library:** Use Winmm.lib.

See Also

Joysticks, Multimedia Joystick Functions, joyGetPos