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

> デバイスが定義する生の入力レポートの説明を取得します。

デバイスが定義する生の入力レポートの説明を取得します。

## 構文

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

### パラメーター

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

*infoArray* の要素数。すべての入力レポートを取得するには、[GetInputReportCount](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md) から返された値を渡します。

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

入力レポートごとに 1 つの構造体を受け取る配列へのポインター。`nullptr` を指定できます。その場合、何も書き込まれず、メソッドは 0 を返します。

### 戻り値

型: uint32\_t

*infoArray* に書き込まれた要素の数。これは *infoArrayCount* とデバイス上の入力レポートの数のうち小さい方の値です。*infoArray* が `nullptr` の場合、またはデバイスに入力レポートがない場合は 0 です。

## 解説

各要素は [GameInputRawDeviceReportInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md) 構造体です。その `kind` メンバーは `GameInputRawInputReport`、`id` メンバーはデバイスが定義するレポート ID、`size` メンバーはレポート データのサイズ (バイト単位) です。

[GetInputReportCount](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md) を呼び出して入力レポートの数を取得し、そのサイズの配列を割り当ててから、`GetInputReportInfo` を呼び出して配列にデータを格納します。*infoArrayCount* が入力レポートの数より小さい場合は、先頭から *infoArrayCount* 個の要素のみが書き込まれます。デバイスが接続されている間、デバイスの入力レポートは変化しないため、一度クエリを実行して結果をキャッシュできます。

各要素の `id` メンバーは、このデバイスの読み取りから [IGameInputReading::GetRawReport](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getrawreport.md) が返す生のレポートについて、[IGameInputRawDeviceReport::GetReportInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getreportinfo.md) から返されるレポート ID と一致します。

次の例は、デバイスの入力レポートを取得する方法を示しています。

```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.
}
```

GameInput v3 以前では、この情報は [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md) から返される [GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) 構造体の `inputReportInfo` メンバーから取得できました。

## 要件

**ヘッダー:** GameInput.h

**ライブラリ:** gameinput.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体、XBOX Series 本体

## 関連項目

[GameInput の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[GetInputReportCount](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)\
[GameInputRawDeviceReportInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)\
[GameInputRawDeviceReportKind](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputrawdevicereportkind.md)\
[IGameInputRawDeviceReport](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)\
[IGameInputReading::GetRawReport](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getrawreport.md)\
[GameInput の高度なトピック](https://docs.xbox.com/ja-jp/build/core-features/common/input/advanced/input-advanced-topics.md)\
[IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## バージョン履歴

| バージョン | 変更内容 |
| - | - |
| **v4** | 導入されました。 |


## Related topics

- [GameInputRawDeviceReportInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)
- [IGameInputDevice::GetInputReportCount](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)
- [IGameInputDevice::GetFeatureReportInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md)
- [IGameInputDevice::GetOutputReportInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getoutputreportinfo.md)
- [IGameInputDevice::GetFeatureReportCount](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportcount.md)
