joyGetPosEx function
Applies to: desktop apps only
The joyGetPosEx function queries a joystick for its position and button status.
Syntax
MMRESULT joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji );
Parameters
- uJoyID
-
Identifier of the joystick to be queried. Valid values for uJoyID range from zero (JOYSTICKID1) to 15.
- pji
-
Pointer to a JOYINFOEX structure that contains extended position information and button status of the joystick. You must set the dwSize and dwFlags members or joyGetPosEx will fail. The information returned from joyGetPosEx depends on the flags you specify in dwFlags.
Return value
Returns JOYERR_NOERROR if successful or one of the following error values.
| Return code | Description |
|---|---|
|
The joystick driver is not present. |
|
An invalid parameter was passed. |
|
The specified joystick identifier is invalid. |
|
The specified joystick is not connected to the system. |
|
The specified joystick identifier is invalid. |
Remarks
This function provides access to extended devices such as rudder pedals, point-of-view hats, devices with a large number of buttons, and coordinate systems using up to six axes. For joystick devices that use three axes or fewer and have fewer than four buttons, use the joyGetPos function.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/3/2012