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

> Retrieves descriptions of the raw feature reports that the device defines.

Retrieves descriptions of the raw feature reports that the device defines.

## Syntax

```cpp theme={null}
uint32_t GetFeatureReportInfo(
    uint32_t infoArrayCount,
    GameInputRawDeviceReportInfo* infoArray
);
```

### Parameters

*infoArrayCount*   \_In\_\
Type: uint32\_t

Number of elements in *infoArray*. To retrieve all feature reports, pass the value returned by [GetFeatureReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportcount.md).

*infoArray*   \_Out\_writes\_to\_opt\_(infoArrayCount, return)\
Type: [GameInputRawDeviceReportInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)\*

Pointer to an array that receives one structure per feature report. Can be `nullptr`, in which case nothing is written and the method returns 0.

### Return value

Type: uint32\_t

The number of elements written to *infoArray*. This is the smaller of *infoArrayCount* and the number of feature reports on the device, or 0 if *infoArray* is `nullptr` or the device has no feature reports.

## Remarks

Each element is a [GameInputRawDeviceReportInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md) structure whose `kind` member is `GameInputRawFeatureReport`, whose `id` member is the device-defined report ID, and whose `size` member is the size of the report data in bytes.

Call [GetFeatureReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportcount.md) to get the number of feature reports, allocate an array of that size, and then call `GetFeatureReportInfo` to fill it. If *infoArrayCount* is smaller than the number of feature reports, only the first *infoArrayCount* elements are written. The feature reports of a device don't change while the device is connected, so you can query them once and cache the result.

Use the `id` member of an element as the *reportId* parameter of [GetRawDeviceFeature](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md) to read the report, or of [CreateRawDeviceReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md), together with `GameInputRawFeatureReport`, to create a report that you can send with [SetRawDeviceFeature](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md). The `size` member gives the number of bytes of report data.

The following example shows how to retrieve the feature reports of a device.

```cpp theme={null}
uint32_t reportCount = device->GetFeatureReportCount();
std::vector<GameInputRawDeviceReportInfo> reports(reportCount);
reports.resize(device->GetFeatureReportInfo(reportCount, reports.data()));

for (const GameInputRawDeviceReportInfo& report : reports)
{
    Microsoft::WRL::ComPtr<IGameInputRawDeviceReport> feature;
    if (SUCCEEDED(device->GetRawDeviceFeature(report.id, &feature)))
    {
        // Read the report data with GetRawDataSize and GetRawData.
    }
}
```

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

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

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[GetFeatureReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportcount.md)\
[GameInputRawDeviceReportInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)\
[GameInputRawDeviceReportKind](https://docs.xbox.com/reference/input/gameinput/enums/gameinputrawdevicereportkind.md)\
[IGameInputRawDeviceReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)\
[GetRawDeviceFeature](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)\
[SetRawDeviceFeature](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)\
[CreateRawDeviceReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md)\
[Advanced GameInput topics](https://docs.xbox.com/build/core-features/common/input/advanced/input-advanced-topics.md)\
[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Version History

| Version | Changes |
| - | - |
| **v4** | Introduced. |


## Related topics

- [GameInputRawDeviceReportInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)
- [IGameInputDevice::GetFeatureReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportcount.md)
- [IGameInputDevice::GetRawDeviceFeature](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)
- [IGameInputDevice::SetRawDeviceFeature](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)
- [IGameInputDevice::GetInputReportInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportinfo.md)
