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

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

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

## Syntax

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

### Parameters

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

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

## Remarks

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

Call [GetOutputReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getoutputreportcount.md) to get the number of output reports, allocate an array of that size, and then call `GetOutputReportInfo` to fill it. If *infoArrayCount* is smaller than the number of output reports, only the first *infoArrayCount* elements are written. The output 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 [CreateRawDeviceReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md), together with `GameInputRawOutputReport`, to create an output report that you can send with [SendRawDeviceOutput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_sendrawdeviceoutput.md). The `size` member gives the number of bytes of report data that the device expects.

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

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

for (const GameInputRawDeviceReportInfo& report : reports)
{
    Microsoft::WRL::ComPtr<IGameInputRawDeviceReport> output;
    if (SUCCEEDED(device->CreateRawDeviceReport(report.id, GameInputRawOutputReport, &output)))
    {
        // Fill the report with SetRawData, then send it with SendRawDeviceOutput.
    }
}
```

In GameInput v3 and earlier, this information was available from the `outputReportInfo` 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)\
[GetOutputReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getoutputreportcount.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)\
[CreateRawDeviceReport](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md)\
[SendRawDeviceOutput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_sendrawdeviceoutput.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::GetOutputReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getoutputreportcount.md)
- [IGameInputDevice::GetInputReportInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportinfo.md)
- [IGameInputDevice::GetFeatureReportInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md)
- [IGameInputDevice::GetInputReportCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)
