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

# XInputGetDeviceId

> XInputGetDeviceId

# XInputGetDeviceId

Récupère l'ID d'appareil de la manette spécifiée.

<a id="syntaxSection" />

## Syntaxe

```cpp theme={null}
DWORD XInputGetDeviceId(  
         DWORD dwUserIndex,  
         APP_LOCAL_DEVICE_ID * pDeviceId  
)  
```

<a id="parametersSection" />

### Paramètres

*dwUserIndex*   \_In\_\
Type : DWORD

Index du joueur associé à l'appareil; valeur comprise entre 0 et `XUSER_MAX_COUNT - 1`.

*pDeviceId*   \_Out\_\
Type : APP\_LOCAL\_DEVICE\_ID\*

ID de l'appareil à l'index d'utilisateur spécifié.

<a id="retvalSection" />

### Valeur de retour

Type : DWORD

Si la fonction récupère correctement l'ID d'appareil, elle retourne `ERROR_SUCCESS`.

Si la manette n'est pas connectée, la fonction retourne `ERROR_DEVICE_NOT_CONNECTED`.

Si la fonction échoue, elle retourne un code d'erreur Win32.

<a id="remarksSection" />

## Remarques

Un ID d'appareil local à l'application identifie un appareil de façon unique, même entre les redémarrages du titre ou du système. Pour plus d'informations, consultez [ID d'appareil](/fr-CA/build/core-features/common/input/overviews/input-devices#deviceIdsSection).

Pour plus d'informations sur l'utilisation d'XInputOnGameInput, consultez [Le wrapper XInputOnGameInput](/fr-CA/build/core-features/common/input/porting/input-porting-xinput#xinputWrapperSection).

<a id="requirementsSection" />

## Configuration requise

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

**Bibliothèque :** xgameruntime.lib

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

<a id="seealsoSection" />

## Voir aussi

[Portage d'XInput vers GameInput](/fr-CA/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/fr-CA/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XInputGetDeviceId](/reference/input/xinputongameinput/functions/xinputgetdeviceid.md)
- [Users and input devices](/build/core-features/common/user/users-input-devices.md)
- [APP_LOCAL_DEVICE_ID](/reference/system/xuser/structs/app_local_device_id.md)
