joyGetDevCaps function

The joyGetDevCaps function queries a joystick to determine its capabilities.

Syntax

MMRESULT joyGetDevCaps(
   UINT_PTR  uJoyID,
   LPJOYCAPS pjc,
   UINT      cbjc
);

Parameters

  • uJoyID
    Identifier of the joystick to be queried. Valid values for uJoyID range from -1 to 15. A value of -1 enables retrieval of the szRegKey member of the JOYCAPS structure whether a device is present or not.

  • pjc
    Pointer to a JOYCAPS structure to contain the capabilities of the joystick.

  • cbjc
    Size, in bytes, of the JOYCAPS structure.

Return value

Returns JOYERR_NOERROR if successful or one of the following error values:

Return code Description
MMSYSERR_NODRIVER

The joystick driver is not present, or the specified joystick identifier is invalid. The specified joystick identifier is invalid.

MMSYSERR_INVALPARAM

An invalid parameter was passed.

 

Remarks

Use the joyGetNumDevs function to determine the number of joystick devices supported by the driver.

This method fails when passed an invalid value for the cbjc parameter.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mmsystem.h (include Windows.h)

Library

Winmm.lib

DLL

Winmm.dll

Unicode and ANSI names

joyGetDevCapsW (Unicode) and joGetDevCapsA (ANSI)

See also

Joysticks

Multimedia Joystick Functions