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

# GetRawData

> IGameInputRawDeviceReport::GetRawData

Retrieves the report buffer contents in raw byte form.

## Syntax

```cpp theme={null}
size_t GetRawData(
    size_t bufferSize,
    void* buffer
)
```

### Parameters

*bufferSize*   \_In\_\

Type: size\_t

Size of the buffer passed into `GetRawData`.

*buffer*   \_Out\_writes\_(bufferSize)\

Type: void\*

User-created buffer returned with raw data.

### Return value

Type: size\_t

Returns the number of bytes written to the caller's buffer for Game Input Protocol (GIP) devices.

## Remarks

The `IGameInputRawDeviceReport::GetRawData` method allows applications to read the report buffer contents in raw byte form. The caller typically passes in a buffer whose size matches the value returned from the [GetRawDataSize](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdatasize.md) method. However, the `GetRawData` method accepts any size buffer. If the buffer is too small, the output is simply truncated. The return value from the `GetRawData` method indicates how many bytes were written to the caller's buffer. This differs only from the value of the `bufferSize` parameter when a buffer is provided that is larger than required.

## Requirements

**Header:** GameInput.h

**Library:** xgameruntime.lib

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

## See also

[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)
- [GetRawDataSize](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdatasize.md)
- [SetRawData](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_setrawdata.md)
- [GetRawReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getrawreport.md)
- [SendRawDeviceOutput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_sendrawdeviceoutput.md)
