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

# SendGamepadReport

> IXtfInputClient::SendGamepadReport メソッド

# IXtfInputClient::SendGamepadReport メソッド

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

## 構文

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

### パラメーター

*controllerId*\
型: UINT64

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

*report*\
型: GAMEPAD\_REPORT

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

### 戻り値

型: HRESULT

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

## 解説

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

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

## 要件

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

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

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

## 関連項目

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


## Related topics

- [GAMEPAD_REPORT 構造体](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t.md)
- [ConnectGamepad](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient インターフェイス (インターフェイスの内容)](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md)
- [SendGamepadReportEx](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportex.md)
- [SendGamepadReportWithAudio](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportwithaudio.md)
