> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.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](/fr/build/core-features/common/input/overviews/input-overview)\
[GameInputDeviceInfo](/fr/reference/input/gameinput/structs/gameinputdeviceinfo)\
[IGameInputDevice](/fr/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)

## Historique des versions

| Version | Modifications |
| - | - |
| **v3** | Signature inchangée. [GameInputDeviceInfo](/fr/reference/input/gameinput/structs/gameinputdeviceinfo) é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](/fr/reference/input/gameinput/structs/gameinputdeviceinfo) étendue avec `revisionNumber`, `hardwareVersion`, `firmwareVersion`, `containerId` et `sensorsInfo`. |
| **v1** | Signature inchangée. [GameInputDeviceInfo](/fr/reference/input/gameinput/structs/gameinputdeviceinfo) 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

- [GetDeviceInfo](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md)
- [GameInputDeviceInfo](/reference/input/gameinput/structs/gameinputdeviceinfo.md)
- [GameInputRawDeviceReportInfo](/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md)
- [GameInputSensorsInfo](/reference/input/gameinput/structs/gameinputsensorsinfo.md)
- [GameInputGamepadInfo](/reference/input/gameinput/structs/gameinputgamepadinfo.md)
