DirectX SDK |
The DirectInputDevice.GetDeviceStateJoystick method retrieves instantaneous data from a joystick device.
object.GetDeviceStateJoystick(state As DIJOYSTATE)
If the method fails, an error is raised and Err.Number may be one of the following error codes:
DIERR_INPUTLOST |
DIERR_INVALIDPARAM |
DIERR_NOTACQUIRED |
E_PENDING |
Before device data can be obtained, you must set the cooperative level by using the DirectInputDevice.SetCooperativeLevel method, then set the data format by using DirectInputDevice.SetCommonDataFormat, and acquire the device by using the DirectInputDevice.Acquire method.