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

# IGameInputDevice::GetFeatureReportCount

> 取得裝置所定義的原始功能報告數目。

取得裝置所定義的原始功能報告數目。

## 語法

```cpp theme={null}
uint32_t GetFeatureReportCount();
```

### 參數

此方法沒有參數。

### 傳回值

類型：uint32\_t

裝置所定義的功能報告數目；如果裝置沒有功能報告或不公開原始報告，則為 0。

## 備註

功能報告是承載裝置設定或狀態資料的原始報告，應用程式會視需要讀取或寫入這些報告。呼叫 [GetRawDeviceFeature](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md) 以讀取功能報告。若要寫入功能報告，請以報告識別碼和 `GameInputRawFeatureReport` 呼叫 [CreateRawDeviceReport](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md) 來建立報告，使用 [IGameInputRawDeviceReport::SetRawData](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_setrawdata.md) 填入報告，然後將其傳遞給 [SetRawDeviceFeature](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)。目前會針對 HID 裝置公開功能報告。

使用傳回的值來決定您傳遞給 [GetFeatureReportInfo](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md) 之陣列的大小。在裝置連線期間，功能報告數目不會變更。

## 需求

**標頭：** GameInput.h

**程式庫：** gameinput.lib

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

## 另請參閱

[GameInput 概觀](https://docs.xbox.com/zh-TW/build/core-features/common/input/overviews/input-overview.md)\
[GetFeatureReportInfo](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md)\
[GameInputRawDeviceReportInfo](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)\
[IGameInputRawDeviceReport](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)\
[GetRawDeviceFeature](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)\
[SetRawDeviceFeature](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)\
[CreateRawDeviceReport](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md)\
[GameInput 進階主題](https://docs.xbox.com/zh-TW/build/core-features/common/input/advanced/input-advanced-topics.md)\
[IGameInputDevice](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v4** | 已推出。 |


## Related topics

- [IGameInputDevice::GetRawDeviceFeature](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)
- [IGameInputDevice::GetFeatureReportInfo](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md)
- [IGameInputDevice::SetRawDeviceFeature](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)
- [IGameInputDevice::GetInputReportCount](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)
- [IGameInputDevice::GetOutputReportCount](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getoutputreportcount.md)
