> ## 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 (déconseillé)

> Accède aux informations statiques sur l'ensemble des propriétés et des capacités d'un périphérique d'entrée (supprimée dans la v4).

> [!WARNING]
>
> **Obsolète.** Cette méthode a été supprimée dans GameInput v4 et n'est pas disponible dans l'API actuelle. Utilisez plutôt les méthodes d'accès individuelles de [IGameInputDevice](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md), comme [GetVendorId](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getvendorid.md) et [GetRacingWheelInfo](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getracingwheelinfo.md). Pour connaître la correspondance entre chaque membre de [GameInputDeviceInfo](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) et son remplacement, consultez la section Remarques de cette page.

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 = SUCCEEDED(wheel->GetDeviceInfo(&wheelInfo));
    assert(succeeded);
    assert(wheelInfo->racingWheelInfo);

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

    return hasClutch;
}
```

## Configuration requise

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

## Voir aussi

[Membres obsolètes de l'API GameInput](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)\
[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/deprecated/structs/gameinputdeviceinfo.md)\
[IGameInputDevice](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Historique des versions

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

- [GetDeviceInfo](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md)
- [GameInputDeviceInfo (déconseillé)](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md)
- [IGameInputDevice::GetKeyboardInfo](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getkeyboardinfo.md)
- [IGameInputDevice::GetSensorsInfo](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsensorsinfo.md)
- [IGameInputDevice::GetMouseInfo](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getmouseinfo.md)
