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

> Obtient l'utilisation HID qui décrit la fonction principale du périphérique d'entrée.

Obtient l'utilisation HID qui décrit la fonction principale du périphérique d'entrée.

## Syntaxe

```cpp theme={null}
void GetUsage(
    GameInputUsage* usage
);
```

### Paramètres

*usage*   \_Out\_\
Type : [GameInputUsage](https://docs.xbox.com/fr-CA/reference/input/gameinput/structs/gameinputusage.md)\*

Reçoit la page d'utilisation HID et l'ID d'utilisation du périphérique.

### Valeur de retour

Type : void

## Remarques

L'utilisation est un index HID en deux parties, composé d'une page d'utilisation et d'un ID d'utilisation, qui décrit la nature du périphérique. Par exemple, une manette de jeu signale généralement la page d'utilisation Generic Desktop (0x01) avec l'ID d'utilisation Gamepad (0x05). Si le périphérique ne signale aucune utilisation, les deux membres de *usage* sont mis à 0.

L'utilisation ne change pas pendant toute la durée de vie de l'objet périphérique. Pour déterminer quels types d'entrée GameInput peut lire à partir du périphérique, utilisez plutôt [IGameInputDevice::GetSupportedInput](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md).

Dans GameInput v3 et les versions antérieures, ces informations étaient disponibles dans le membre `usage` 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)\
[IGameInputDevice](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[GameInputUsage](https://docs.xbox.com/fr-CA/reference/input/gameinput/structs/gameinputusage.md)\
[IGameInputDevice::GetSupportedInput](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)

## Historique des versions

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


## Related topics

- [IGameInputDevice (contenu de l'interface)](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
- [IGameInputDevice::GetDeviceFamily](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdevicefamily.md)
- [IGameInputDevice::GetDeviceId](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)
- [IGameInputDevice::GetXInputDeviceIndex](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getxinputdeviceindex.md)
- [IGameInputDevice::GetSupportedInput](https://docs.xbox.com/fr-CA/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)
