0 out of 1 rated this helpful - Rate this topic

joyGetPos function

Applies to: desktop apps only

The joyGetPos function queries a joystick for its position and button status.

Syntax

MMRESULT joyGetPos(
  UINT uJoyID,
  LPJOYINFO pji
);

Parameters

uJoyID

Identifier of the joystick to be queried. Valid values for uJoyID range from zero (JOYSTICKID1) to 15.

pji

Pointer to a JOYINFO structure that contains the position and button status of the joystick.

Return value

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

Return codeDescription
MMSYSERR_NODRIVER

The joystick driver is not present.

MMSYSERR_INVALPARAM

An invalid parameter was passed.

JOYERR_UNPLUGGED

The specified joystick is not connected to the system.

 

Remarks

For devices that have four to six axes of movement, a point-of-view control, or more than four buttons, use the joyGetPosEx function.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Mmsystem.h (include Windows.h)

Library

Winmm.lib

DLL

Winmm.dll

See also

Joysticks
Multimedia Joystick Functions

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ