joyGetNumDevs

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

UINT joyGetNumDevs(VOID); 

Parameters

This function takes no parameters.

Return Values

Returns the number of joysticks supported by the joystick driver or zero if no driver is present.

Remarks

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.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in mmsystem.h.
  Import Library: Use winmm.lib.

See Also

Joysticks Overview, Multimedia Joystick Functions, joyGetPos