> ## 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.

# SendGamepadReportEx

> IXtfInputClient::SendGamepadReportEx

Sends a controller state report to the console.

## Syntax

```cpp theme={null}
HRESULT SendGamepadReportEx(  
         UINT64 controllerId,  
         GAMEPAD_REPORT_EX report  
)  
```

### Parameters

*controllerId*   \
Type: UINT64

The device identifier of this [IXtfInputClient](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md).\
The controller ID is the controller ID returned by [IXtfInputClient::ConnectGamepad](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md).

*report*   \
Type: [GAMEPAD\_REPORT\_EX](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/gamepad_report_ex.md)

The controller state to report.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

The **SendGameReportEx** method sends a controller state represented by a [GAMEPAD\_REPORT\_EX](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/gamepad_report_ex.md) to a virtual controller created by [IXtfInputClient::ConnectGamepad](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md). You will need to send multiple states to simulate a single button press and release. To simulate a button press, call **SendGamepadReportEx** with the appropriate flag set in [GAMEPAD\_REPORT\_EX.Buttons](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/gamepad_report_ex.md), and then call **SendGamepadReportEx** again, with [GAMEPAD\_REPORT\_EX.Buttons](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/gamepad_report_ex.md) set to [GAMEPAD\_BUTTONS::NONE](https://docs.xbox.com/reference/tools/xtf/xtfinput/enumerations/GAMEPAD_BUTTONS-typedef-xtfinput-xbox-windows-t.md).

**SendGamepadReportEx** can be called at 60Hz to mimic data coming from a physical controller.

## Requirements

**Header:** XtfInput.h

**Library:** xtfinput.lib

**Supported platforms:** Windows (for XBOX console tools)

## See also

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


## Related topics

- [GAMEPAD_REPORT_EX](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/gamepad_report_ex.md)
- [IXtfInputClient Interface (Interface contents)](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md)
- [SendGamepadReportWithAudio](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportwithaudio.md)
- [SendGamepadReport](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/sendgamepadreport-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [GAMEPAD_REPORT structure](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t.md)
