Tao.Platform.Windows SDK Documentation

Winmm.joyGetDevCaps Method 

The joyGetDevCaps function queries a joystick to determine its capabilities.

[Visual Basic]
Public Shared Function joyGetDevCaps( _
   ByVal uJoyID As IntPtr, _
   ByRef pjc As JOYCAPS, _
   ByVal cbjc As Integer _
) As Integer
[C#]
public static int joyGetDevCaps(
   IntPtr uJoyID,
   ref JOYCAPS pjc,
   int 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. For Windows NT 4.0, valid values are limited to zero (JOYSTICKID1) and JOYSTICKID2.
pjc
Pointer to a Winmm.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:

MMSYSERR_NODRIVER - The joystick driver is not present. Windows NT/2000/XP: The specified joystick identifier is invalid. MMSYSERR_INVALPARAM - An invalid parameter was passed. Windows 95/98/Me: The specified joystick identifier is invalid.

Remarks

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

Windows NT/2000/XP: This method fails when passed an invalid value for the cbjc parameter. Windows 95/98/Me: This method succeeds when passed an invalid value for the cbjc parameter.

See Also

Winmm Class | Tao.Platform.Windows Namespace | Winmm.JOYCAPS | joyGetNumDevs