joyGetDevCaps function (joystickapi.h)
The joyGetDevCaps function queries a joystick to determine its capabilities.
Syntax
MMRESULT joyGetDevCaps(
UINT 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 |
---|---|
|
The joystick driver is not present, or the specified joystick identifier is invalid. The specified joystick identifier is invalid. |
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | joystickapi.h (include Windows.h) |
Library | Winmm.lib |
DLL | Winmm.dll |