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

# XInputGetStateWithToken

> XInputGetStateWithToken

# XInputGetStateWithToken

Récupère l'état actuel de la manette spécifiée et l'associe à un jeton de pipeline d'images D3DX.

<a id="syntaxSection" />

## Syntaxe

```cpp theme={null}
DWORD XInputGetStateWithToken(  
         DWORD dwUserIndex,  
         UINT64 framePipelineToken,  
         XINPUT_STATE * pState  
)  
```

<a id="parametersSection" />

### Paramètres

*dwUserIndex*   \_In\_\
Type : DWORD

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

*framePipelineToken*   \_In\_\
Type : UINT64

Jeton de pipeline d'images D3DX.

*pState*   \_Out\_\
Type : [XINPUT\_STATE](/fr-CA/reference/input/xinputongameinput/structs/xinput_state)\*

Pointeur vers un objet [XINPUT\_STATE](/fr-CA/reference/input/xinputongameinput/structs/xinput_state) qui reçoit l'état actuel de la manette.

<a id="retvalSection" />

### Valeur de retour

Type : DWORD

Si la fonction réussit, 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 défini dans WinError.h.

<a id="remarksSection" />

## Remarques

Cette fonction est semblable à [XInputGetState](/fr-CA/reference/input/xinputongameinput/functions/xinputgetstate), mais elle associe une lecture d'entrée précise à une image graphique pour une analyse ultérieure.

<Note>Depuis la version May Preview, le comportement de `XInputGetStateWithToken` est identique à celui de `XInputGetState`, car le code GameInput sous-jacent n'est pas entièrement implémenté.</Note>

En fournissant le jeton de pipeline d'images, vous pouvez ensuite mettre en corrélation les appels d'API d'entrée avec des images graphiques précises dans le logiciel PIX.

<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

- [XInputGetStateWithToken](/reference/input/xinputongameinput/functions/xinputgetstatewithtoken.md)
- [XInputGetState](/reference/input/xinputongameinput/functions/xinputgetstate.md)
- [XINPUT_STATE](/reference/input/xinputongameinput/structs/xinput_state.md)
- [Porting from XInput to GameInput](/build/core-features/common/input/porting/input-porting-xinput.md)
