Microsoft DirectX 8.1 (Visual Basic)

DirectInputDevice8.GetDeviceStateMouse2

Retrieves immediate data from a mouse device that has up to eight buttons.

object.GetDeviceStateMouse2(state As DIMOUSESTATE2)

Parts

object
Resolves to a DirectInputDevice8 object.
state
A DIMOUSESTATE2 type that receives the state of the device.

Error Codes

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

Remarks

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.SetCommonDataFormat, and acquire the device by using the DirectInputDevice8.Acquire method.

See Also

DirectInputDevice8.GetDeviceStateMouse, DirectInputDevice8.Poll, Polling and Event Notification