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

Sends a controller state report to the console.

## Syntax

```cpp theme={null}
public:
HRESULT SendGamepadReport(
         UINT64 controllerId,
         GAMEPAD_REPORT 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

The controller state to report

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

The **SendGameReport** method sends a controller state represented by a [GAMEPAD\_REPORT](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t.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 **SendGamepadReport** with the appropriate flag set in [GAMEPAD\_REPORT.Buttons](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t.md), and then call **SendGamepadReport** again, with [GAMEPAD\_REPORT.Buttons](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t.md) set to [GAMEPAD\_BUTTONS::NONE](https://docs.xbox.com/reference/tools/xtf/xtfinput/enumerations/GAMEPAD_BUTTONS-typedef-xtfinput-xbox-windows-t.md).

**SendGamepadReport** 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](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t.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 structure](https://docs.xbox.com/reference/tools/xtf/xtfinput/structures/GAMEPAD_REPORT-xtfinput-xbox-windows-t.md)
- [ConnectGamepad](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient Interface (Interface contents)](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md)
- [SendGamepadReportEx](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportex.md)
- [SendGamepadReportWithAudio](https://docs.xbox.com/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportwithaudio.md)
