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

# 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\_\

Type: size\_t

Size of the raw data buffer to be set.

*buffer*   \_In\_reads\_(bufferSize)\

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](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdatasize.md) 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](https://docs.xbox.com/build/core-features/common/input/advanced/input-advanced-topics.md)\
[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputRawDeviceReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)

## Version History

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


## Related topics

- [IGameInputRawDeviceReport (Interface contents)](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)
- [GetRawData](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdata.md)
- [GetRawDataSize](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdatasize.md)
- [GetRawReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getrawreport.md)
- [IGameInputDevice (Interface contents)](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
