A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z



joyGetPos

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

VB4-32,5,6
Declare Function joyGetPos Lib "winmm.dll" Alias "joyGetPos" (ByVal uJoyID As Long, pji As JOYINFO) As Long

Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later

Library
Winmm

Parameter Information
- uJoyID
Identifier of the joystick (JOYSTICKID1 or JOYSTICKID2) to be queried.

- pji
Address of a JOYINFO structure that contains the position and button status of the joystick.

Return Values
Returns JOYERR_NOERROR if successful or one of the following error values:
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.

Last update: 07 April 2006