> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IXtfInputClient::SendGamepadReport メソッド

> IXtfInputClient::SendGamepadReport メソッド

# IXtfInputClient::SendGamepadReport メソッド

コンソールにコントローラーの状態レポートを送信します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
public:
HRESULT SendGamepadReport(
         UINT64 controllerId,
         GAMEPAD_REPORT report
)  
```

<a id="ID4EG" />

### パラメーター

*controllerId*\
型: UINT64

この [IXtfInputClient](/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t) のデバイス識別子。\
コントローラー ID は、[IXtfInputClient::ConnectGamepad](/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m) によって返されるコントローラー ID です。

*report*\
型: GAMEPAD\_REPORT

レポートするコントローラーの状態

<a id="ID4EP" />

### 戻り値

型: HRESULT

HRESULT の成功またはエラー コード。

<a id="remarks" />

## 解説

**SendGameReport** メソッドは、[GAMEPAD\_REPORT](/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t) で表されるコントローラーの状態を、[IXtfInputClient::ConnectGamepad](/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m) によって作成された仮想コントローラーに送信します。1 回のボタンの押下と解放をシミュレーションするには、複数の状態を送信する必要があります。ボタン押下をシミュレーションするには、[GAMEPAD\_REPORT.Buttons](/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t) に適切なフラグを設定して **SendGamepadReport** を呼び出し、続いて [GAMEPAD\_REPORT.Buttons](/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t) を [GAMEPAD\_BUTTONS::NONE](/reference/tools/xtf/xtfinput/enumerations/GAMEPAD_BUTTONS-typedef-xtfinput-xbox-windows-t) に設定して **SendGamepadReport** を再度呼び出します。

**SendGamepadReport** は、物理コントローラーからのデータを模倣するために 60 Hz で呼び出すことができます。

<a id="requirements" />

## 要件

**ヘッダー:** xtfinput.h

**ライブラリ:** xtfinput.lib

**対応プラットフォーム:** Windows (XBOX コンソール ツール用)

## 関連項目

[XtfInput](/reference/tools/xtf/xtfinput/xtfinput-xbox-microsoft-n)\
[GAMEPAD\_REPORT](/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t)\
[IXtfInputClient::ConnectGamepad](/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m)


## Related topics

- [IXtfInputClient::ConnectGamepad メソッド](/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient::SendGamepadReportEx](/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportex.md)
- [IXtfInputClient::SendGamepadReportWithAudio](/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportwithaudio.md)
- [IXtfInputClient::DisconnectGamepad メソッド](/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient::DisconnectAllGamepads メソッド](/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectallgamepads-ixtfinputclient-xtfinput-xbox-windows-m.md)
