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

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

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

## Syntax

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

### Parameters

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

Number of elements in *infoArray*. To retrieve all input reports, pass the value returned by [GetInputReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.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 input 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 input reports on the device, or 0 if *infoArray* is `nullptr` or the device has no input reports.

## Remarks

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

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

The `id` member of each element matches the report ID returned by [IGameInputRawDeviceReport::GetReportInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getreportinfo.md) for the raw reports that [IGameInputReading::GetRawReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getrawreport.md) returns from readings of this device.

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

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

for (const GameInputRawDeviceReportInfo& report : reports)
{
    // report.id identifies an input report that can arrive in readings;
    // report.size is the size of its data in bytes.
}
```

In GameInput v3 and earlier, this information was available from the `inputReportInfo` member of the [GameInputDeviceInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) structure returned by [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md).

## 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)\
[GetInputReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.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)\
[IGameInputReading::GetRawReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getrawreport.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::GetInputReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)
- [IGameInputDevice (Interface contents)](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
- [IGameInputDevice::GetOutputReportInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getoutputreportinfo.md)
- [IGameInputDevice::GetFeatureReportInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md)
