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

# IGameInputRawDeviceReport::SetRawData

設定報告緩衝區的內容。

## 語法

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

### 參數

*bufferSize*   \_In\_\

類型：size\_t

要設定的原始資料緩衝區大小。

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

類型：void\*

要寫入的緩衝區。

### 傳回值

類型：bool

成功時傳回 true；否則傳回 false。

## 備註

`IGameInputRawDeviceReport::SetRawData` 方法可讓應用程式直接設定報告緩衝區內容。呼叫端必須傳遞大小與 [GetRawDataSize](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdatasize.md) 方法傳回值相符的來源緩衝區。只有輸出報告允許設定報告緩衝區內容。

## 需求

**標頭：** GameInput.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

[進階 GameInput 主題](https://docs.xbox.com/zh-TW/build/core-features/common/input/advanced/input-advanced-topics.md)\
[GameInput 概觀](https://docs.xbox.com/zh-TW/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputRawDeviceReport](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v3** | 重新推出。 |
| **v1** | 隨 IGameInputRawDeviceReport 介面一併移除。 |
| **v0** | 推出。 |


## Related topics

- [IGameInputRawDeviceReport (介面內容)](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)
- [GetRawData](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdata.md)
- [GetRawDataSize](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getrawdatasize.md)
- [SetShapeEqCompRawFilterCoefficients](https://docs.xbox.com/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcomprawfiltercoefficients.md)
- [XblMultiplayerSessionSetRawServersJson](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetrawserversjson.md)
