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

> Récupère les descriptions des rapports d'entrée bruts définis par le périphérique.

Récupère les descriptions des rapports d'entrée bruts définis par le périphérique.

## Syntaxe

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

### Paramètres

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

Nombre d'éléments dans *infoArray*. Pour récupérer tous les rapports d'entrée, transmettez la valeur retournée par [GetInputReportCount](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md).

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

Pointeur vers un tableau qui reçoit une structure par rapport d'entrée. Peut être `nullptr`; dans ce cas, rien n'est écrit et la méthode retourne 0.

### Valeur de retour

Type : uint32\_t

Le nombre d'éléments écrits dans *infoArray*. Il s'agit de la plus petite valeur entre *infoArrayCount* et le nombre de rapports d'entrée du périphérique, ou 0 si *infoArray* est `nullptr` ou si le périphérique n'a aucun rapport d'entrée.

## Remarques

Chaque élément est une structure [GameInputRawDeviceReportInfo](https://docs.xbox.com/fr-CA/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md) dont le membre `kind` vaut `GameInputRawInputReport`, dont le membre `id` est l'ID de rapport défini par le périphérique et dont le membre `size` est la taille des données du rapport, en octets.

Appelez [GetInputReportCount](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md) pour obtenir le nombre de rapports d'entrée, allouez un tableau de cette taille, puis appelez `GetInputReportInfo` pour le remplir. Si *infoArrayCount* est inférieur au nombre de rapports d'entrée, seuls les *infoArrayCount* premiers éléments sont écrits. Les rapports d'entrée d'un périphérique ne changent pas tant que le périphérique est connecté; vous pouvez donc les interroger une seule fois et mettre le résultat en cache.

Le membre `id` de chaque élément correspond à l'ID de rapport retourné par [IGameInputRawDeviceReport::GetReportInfo](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getreportinfo.md) pour les rapports bruts que [IGameInputReading::GetRawReport](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getrawreport.md) retourne à partir des lectures de ce périphérique.

L'exemple suivant montre comment récupérer les rapports d'entrée d'un périphérique.

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

Dans GameInput v3 et les versions antérieures, ces informations étaient disponibles dans le membre `inputReportInfo` de la structure [GameInputDeviceInfo](https://docs.xbox.com/fr-CA/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) retournée par [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/fr-CA/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md).

## Configuration requise

**En-tête :** GameInput.h

**Bibliothèque :** gameinput.lib

**Plateformes prises en charge :** Windows, consoles de la famille XBOX One et consoles XBOX Series

## Voir aussi

[Vue d'ensemble de GameInput](https://docs.xbox.com/fr-CA/build/core-features/common/input/overviews/input-overview.md)\
[GetInputReportCount](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)\
[GameInputRawDeviceReportInfo](https://docs.xbox.com/fr-CA/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)\
[GameInputRawDeviceReportKind](https://docs.xbox.com/fr-CA/reference/input/gameinput/enums/gameinputrawdevicereportkind.md)\
[IGameInputRawDeviceReport](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)\
[IGameInputReading::GetRawReport](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getrawreport.md)\
[Rubriques avancées sur GameInput](https://docs.xbox.com/fr-CA/build/core-features/common/input/advanced/input-advanced-topics.md)\
[IGameInputDevice](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Historique des versions

| Version | Modifications |
| - | - |
| **v4** | Introduit. |


## Related topics

- [GameInputRawDeviceReportInfo](https://docs.xbox.com/fr-CA/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)
- [IGameInputDevice::GetInputReportCount](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)
- [IGameInputDevice::GetFeatureReportInfo](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md)
- [IGameInputDevice::GetOutputReportInfo](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getoutputreportinfo.md)
- [IGameInputDevice (contenu de l'interface)](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
