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

# IGameInputRawDeviceReport::SetRawData

> IGameInputRawDeviceReport::SetRawData

# IGameInputRawDeviceReport::SetRawData

Sets the contents of the report buffer.

## Syntax

```cpp theme={null}
bool SetRawData(
    size_t bufferSize,
    const void* buffer
)
```

### Parameters

*bufferSize*   \_In\_<br />
Type: size\_t

Size of the raw data buffer to be set.

*buffer*   \_In\_reads\_(bufferSize)<br />
Type: void\*

Buffer to be written to.

### Return value

Type: bool

Returns true on success; returns false otherwise.

## Remarks

The `IGameInputRawDeviceReport::SetRawData` method allows applications to set the report buffer contents directly. The caller must pass a source buffer whose size matches the value returned from the [GetRawDataSize](/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdatasize) method. Setting the report buffer contents is allowed only for output reports.

## Requirements

**Header:** GameInput.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

[Advanced GameInput topics](/build/core-features/common/input/advanced/input-advanced-topics)\
[Overview of GameInput](/build/core-features/common/input/overviews/input-overview)\
[IGameInputRawDeviceReport](/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport)

## Version History

| Version | Changes                                                     |
| ------- | ----------------------------------------------------------- |
| **v3**  | Re-introduced.                                              |
| **v1**  | Removed along with the IGameInputRawDeviceReport interface. |
| **v0**  | Introduced.                                                 |


## Related topics

- [IGameInputRawDeviceReport](/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)
- [IGameInputRawDeviceReport::GetRawData](/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdata.md)
- [IGameInputRawDeviceReport::GetRawDataSize](/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdatasize.md)
- [IGameInputDevice::SetRawDeviceFeature](/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)
- [IGameInputRawDeviceReport::GetDevice](/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getdevice.md)
