Microsoft DirectX 8.1 (Visual Basic) |
Retrieves immediate data for a device other than a standard keyboard, mouse, or joystick.
object.GetDeviceState(cb As Long, state As Any)
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 DirectInputDevice8.SetCooperativeLevel method, then set the data format by using DirectInputDevice8.SetDataFormat, and acquire the device by using the DirectInputDevice8.Acquire method.
DirectInputDevice8.GetDeviceStateJoystick, DirectInputDevice8.GetDeviceStateJoystick2, DirectInputDevice8.GetDeviceStateKeyboard, DirectInputDevice8.GetDeviceStateMouse, DirectInputDevice8.SetDataFormat, Buffered and Immediate Data