ホーム › UI.Input.GameInput › IGameInputDevice
IGameInputDevice
COMメソッド 19
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 GameInputDeviceInfo* GetDeviceInfo()
vtbl 4 GameInputDeviceStatus GetDeviceStatus()
vtbl 5 void GetBatteryState(GameInputBatteryState* state)
| state | GameInputBatteryState* | out | デバイスのバッテリー状態(GameInputBatteryState)を受け取る。 |
vtbl 6 HRESULT CreateForceFeedbackEffect(DWORD motorIndex, GameInputForceFeedbackParams* params, IGameInputForceFeedbackEffect** effect)
| motorIndex | DWORD | in | 対象とするモーターのインデックスを指定する。 |
| params | GameInputForceFeedbackParams* | in | 生成するフォースフィードバック効果のパラメータ(GameInputForceFeedbackParams)へのポインタである。 |
| effect | IGameInputForceFeedbackEffect** | out | 生成された効果(IGameInputForceFeedbackEffect)を受け取る。 |
| motorIndex | DWORD | in | 対象とするモーターのインデックスを指定する。 |
| motorIndex | DWORD | in | 対象とするモーターのインデックスを指定する。 |
| masterGain | FLOAT | in | モーター全体のマスターゲイン(0.0〜1.0)を指定する。 |
vtbl 9 HRESULT SetHapticMotorState(DWORD motorIndex, GameInputHapticFeedbackParams* params)
| motorIndex | DWORD | in | 対象とするモーターのインデックスを指定する。 |
| params | GameInputHapticFeedbackParams* | inoptional | 設定する触覚フィードバックのパラメータ(GameInputHapticFeedbackParams)へのポインタである。 |
vtbl 10 void SetRumbleState(GameInputRumbleParams* params)
| params | GameInputRumbleParams* | inoptional | 設定する振動(ランブル)のパラメータ(GameInputRumbleParams)へのポインタである。 |
vtbl 11 void SetInputSynchronizationState(BYTE enabled)
| enabled | BYTE | in | 入力の同期を有効にするかどうかを指定する。 |
vtbl 12 void SendInputSynchronizationHint()
vtbl 13 void PowerOff()
vtbl 14 HRESULT CreateRawDeviceReport(DWORD reportId, GameInputRawDeviceReportKind reportKind, IGameInputRawDeviceReport** report)
| reportId | DWORD | in | 作成する生レポートの ID を指定する。 |
| reportKind | GameInputRawDeviceReportKind | in | 生レポートの種別(GameInputRawDeviceReportKind)を指定する。 |
| report | IGameInputRawDeviceReport** | out | 作成された生デバイスレポートを受け取る。 |
vtbl 15 HRESULT GetRawDeviceFeature(DWORD reportId, IGameInputRawDeviceReport** report)
| reportId | DWORD | in | 取得するフィーチャーレポートの ID を指定する。 |
| report | IGameInputRawDeviceReport** | out | 取得した生デバイスレポートを受け取る。 |
vtbl 16 HRESULT SetRawDeviceFeature(IGameInputRawDeviceReport* report)
| report | IGameInputRawDeviceReport* | in | 設定する生フィーチャーレポートへのポインタである。 |
vtbl 17 HRESULT SendRawDeviceOutput(IGameInputRawDeviceReport* report)
| report | IGameInputRawDeviceReport* | in | デバイスへ送信する生出力レポートへのポインタである。 |
vtbl 18 HRESULT SendRawDeviceOutputWithResponse(IGameInputRawDeviceReport* requestReport, IGameInputRawDeviceReport** responseReport)
| requestReport | IGameInputRawDeviceReport* | in | デバイスへ送信する要求レポートへのポインタである。 |
| responseReport | IGameInputRawDeviceReport** | out | デバイスからの応答レポートを受け取る。 |
vtbl 19 HRESULT ExecuteRawDeviceIoControl(DWORD controlCode, UINT_PTR inputBufferSize, void* inputBuffer, UINT_PTR outputBufferSize, void* outputBuffer, UINT_PTR* outputSize)
| controlCode | DWORD | in | 実行する I/O 制御コードを指定する。 |
| inputBufferSize | UINT_PTR | in | 入力バッファのサイズ(バイト数)を指定する。 |
| inputBuffer | void* | inoptional | 入力データを格納したバッファへのポインタである。 |
| outputBufferSize | UINT_PTR | in | 出力バッファのサイズ(バイト数)を指定する。 |
| outputBuffer | void* | outoptional | 出力データを受け取るバッファへのポインタである。 |
| outputSize | UINT_PTR* | outoptional | 実際に書き込まれた出力データのサイズを受け取る。 |
| timeoutInMicroseconds | ULONGLONG | in | 排他アクセス取得を待機する最大時間(マイクロ秒)を指定する。 |
vtbl 21 void ReleaseExclusiveRawDeviceAccess()
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IGameInputDevice "{31DD86FB-4C1B-408A-868F-439B3CD47125}" #usecom global IGameInputDevice IID_IGameInputDevice "{}" #comfunc global IGameInputDevice_GetDeviceInfo 3 #comfunc global IGameInputDevice_GetDeviceStatus 4 #comfunc global IGameInputDevice_GetBatteryState 5 var #comfunc global IGameInputDevice_CreateForceFeedbackEffect 6 int,var,sptr #comfunc global IGameInputDevice_IsForceFeedbackMotorPoweredOn 7 int #comfunc global IGameInputDevice_SetForceFeedbackMotorGain 8 int,float #comfunc global IGameInputDevice_SetHapticMotorState 9 int,var #comfunc global IGameInputDevice_SetRumbleState 10 var #comfunc global IGameInputDevice_SetInputSynchronizationState 11 int #comfunc global IGameInputDevice_SendInputSynchronizationHint 12 #comfunc global IGameInputDevice_PowerOff 13 #comfunc global IGameInputDevice_CreateRawDeviceReport 14 int,int,sptr #comfunc global IGameInputDevice_GetRawDeviceFeature 15 int,sptr #comfunc global IGameInputDevice_SetRawDeviceFeature 16 sptr #comfunc global IGameInputDevice_SendRawDeviceOutput 17 sptr #comfunc global IGameInputDevice_SendRawDeviceOutputWithResponse 18 sptr,sptr #comfunc global IGameInputDevice_ExecuteRawDeviceIoControl 19 int,sptr,sptr,sptr,sptr,var #comfunc global IGameInputDevice_AcquireExclusiveRawDeviceAccess 20 int64 #comfunc global IGameInputDevice_ReleaseExclusiveRawDeviceAccess 21 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_IGameInputDevice "{31DD86FB-4C1B-408A-868F-439B3CD47125}" #usecom global IGameInputDevice IID_IGameInputDevice "{}" #comfunc global IGameInputDevice_GetDeviceInfo 3 #comfunc global IGameInputDevice_GetDeviceStatus 4 #comfunc global IGameInputDevice_GetBatteryState 5 sptr #comfunc global IGameInputDevice_CreateForceFeedbackEffect 6 int,sptr,sptr #comfunc global IGameInputDevice_IsForceFeedbackMotorPoweredOn 7 int #comfunc global IGameInputDevice_SetForceFeedbackMotorGain 8 int,float #comfunc global IGameInputDevice_SetHapticMotorState 9 int,sptr #comfunc global IGameInputDevice_SetRumbleState 10 sptr #comfunc global IGameInputDevice_SetInputSynchronizationState 11 int #comfunc global IGameInputDevice_SendInputSynchronizationHint 12 #comfunc global IGameInputDevice_PowerOff 13 #comfunc global IGameInputDevice_CreateRawDeviceReport 14 int,int,sptr #comfunc global IGameInputDevice_GetRawDeviceFeature 15 int,sptr #comfunc global IGameInputDevice_SetRawDeviceFeature 16 sptr #comfunc global IGameInputDevice_SendRawDeviceOutput 17 sptr #comfunc global IGameInputDevice_SendRawDeviceOutputWithResponse 18 sptr,sptr #comfunc global IGameInputDevice_ExecuteRawDeviceIoControl 19 int,sptr,sptr,sptr,sptr,sptr #comfunc global IGameInputDevice_AcquireExclusiveRawDeviceAccess 20 int64 #comfunc global IGameInputDevice_ReleaseExclusiveRawDeviceAccess 21 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。