> ## 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-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md) 读取功能报告。若要写入功能报告，请使用报告 ID 和 `GameInputRawFeatureReport` 调用 [CreateRawDeviceReport](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md) 创建报告，使用 [IGameInputRawDeviceReport::SetRawData](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_setrawdata.md) 填充该报告，然后将其传递给 [SetRawDeviceFeature](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)。目前，功能报告仅对 HID 设备公开。

使用返回的值来确定传递给 [GetFeatureReportInfo](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md) 的数组大小。在设备保持连接期间，功能报告的数量不会更改。

## 要求

**头文件：** GameInput.h

**库：** gameinput.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

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

## 版本历史

| 版本 | 变更 |
| - | - |
| **v4** | 引入。 |


## Related topics

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