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

# GetDeviceInfo

> GetDeviceInfo

# GetDeviceInfo

Accède aux informations statiques sur l'ensemble des propriétés et des capacités d'un périphérique d'entrée.

## Syntaxe

```cpp theme={null}
HRESULT GetDeviceInfo(
    const GameInputDeviceInfo** info
);
```

### Paramètres

*info*   \_Outptr\_\
Type : GameInputDeviceInfo\*\*

Informations sur le périphérique associées à IGameInputDevice.

### Valeur de retour

Type : HRESULT

Résultat de la fonction.

## Remarques

La mémoire de la méthode `GetDeviceInfo` n'appartient pas à l'application. La mémoire reste accessible tant que l'application maintient l'instance `IGameInput` active. Une fois la référence à l'objet `IGameInput` libérée, la mémoire disparaît.

L'exemple de code suivant montre comment déterminer si un volant de course dispose d'un embrayage.

```cpp theme={null}
bool HasClutch(IGameInputDevice* wheel) noexcept
{
    const GameInputDeviceInfo* wheelInfo = nullptr;
    const bool succeeded = wheel->GetDeviceInfo(&wheelInfo);
    assert(succeeded);
    assert(wheelInfo->racingWheelInfo);

    const bool hasClutch = wheelInfo->racingWheelInfo->hasClutch;

    return hasClutch;
}
```

## Configuration requise

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

[Vue d'ensemble de GameInput](https://docs.xbox.com/fr/build/core-features/common/input/overviews/input-overview.md)\
[GameInputDeviceInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputdeviceinfo.md)\
[IGameInputDevice](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Historique des versions

| Version | Modifications |
| - | - |
| **v3** | Signature inchangée. [GameInputDeviceInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputdeviceinfo.md) étendue : ajout de `controllerInfo` (remplaçant les champs distincts de nombre et d'informations des axes, boutons et commutateurs, ainsi que `uiNavigationInfo`) ; ajout de `inputReportCount`/`inputReportInfo` et `outputReportCount`/`outputReportInfo` ; suppression de `hapticFeedbackMotorInfo`. |
| **v2** | Signature inchangée. [GameInputDeviceInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputdeviceinfo.md) étendue avec `revisionNumber`, `hardwareVersion`, `firmwareVersion`, `containerId` et `sensorsInfo`. |
| **v1** | Signature inchangée. [GameInputDeviceInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputdeviceinfo.md) a été considérablement simplifiée : suppression de `infoSize`, `interfaceNumber`, `collectionNumber`, `capabilities` et des champs tactiles, haptiques, de chaînes et de descripteurs ; ajout de `supportedSystemButtons`, `displayName` et `pnpPath`. |
| **v0** | Introduite. |


## Related topics

- [GameInputDeviceInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputdeviceinfo.md)
- [GameInputRawDeviceReportInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)
- [GameInputSensorsInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputsensorsinfo.md)
- [GameInputGamepadInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputgamepadinfo.md)
- [GameInputKeyboardInfo](https://docs.xbox.com/fr/reference/input/gameinput/structs/gameinputkeyboardinfo.md)
