joyGetPosEx

MMRESULT joyGetPosEx(UINT uJoyID, LPJOYINFOEX pji);

Queries a joystick for its position and button status.

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

JOYERR_UNPLUGGED MMSYSERR_BADDEVICEID
MMSYSERR_INVALPARAM MMSYSERR_NODRIVER

uJoyID

Identifier of the joystick to be queried.

pji

Address for a JOYINFOEX structure that contains extended position information and button status of the joystick.

Before calling this function, your application must identify the items to query by setting one or more flags in the dwFlags member of the JOYINFOEX structure.

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.