The JDD_GETPOS message is sent to get the current joystick position and button-state information.
If the driver successfully retrieves the information, JDD_GETPOS returns MMSYSERR_NOERROR. If the joystick is unplugged, JDD-GETPOS returns JOYERR_UNPLUGGED.
The coordinate values returned in the JOYINFO structure should be mapped into the coordinate range identified by the driver. The minimum and maximum values for each axis are defined in the JOYCAPS structure, which the driver fills out in response to the JDD_GETDEVCAPS message.