Platform SDK: DirectX

DirectInputDevice.GetDeviceStateMouse

DirectInputDevice.GetDeviceStateMouse メソッドは、マウス デバイスから直接データを取得する。

object.GetDeviceStateMouse(state As DIMOUSESTATE)

パラメータ

object
DirectInputDevice オブジェクトを表すオブジェクト式。
state
デバイスの現在の状態を受け取る DIMOUSESTATE 型。

エラー コード

失敗すればエラーが発生し、Err.Number に次のいずれかのエラー コードが設定される。

DIERR_INPUTLOST
DIERR_INVALIDPARAM
DIERR_NOTACQUIRED
E_PENDING

注意

デバイス データを取得する前に、DirectInputDevice.SetCooperativeLevel メソッドで協調レベルを設定し、DirectInputDevice.SetCommonDataFormat メソッドでデータ形式を設定し、DirectInputDevice.Acquire メソッドでデバイスを取得しなければならない。

参照

DirectInputDevice.Poll