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

Recupera el estado actual del mando especificado y lo asocia con un token de canalización de fotogramas D3DX.

<a id="syntaxSection" />

## Sintaxis

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

<a id="parametersSection" />

### Parámetros

*dwUserIndex*   \_In\_\
Tipo: DWORD

Índice del jugador asociado al dispositivo; un valor en el intervalo de 0 a `XUSER_MAX_COUNT - 1`.

*framePipelineToken*   \_In\_\
Tipo: UINT64

Token de canalización de fotogramas D3DX.

*pState*   \_Out\_\
Tipo: [XINPUT\_STATE](/reference/input/xinputongameinput/structs/xinput_state)\*

Puntero a un objeto [XINPUT\_STATE](/reference/input/xinputongameinput/structs/xinput_state) que recibe el estado actual del mando.

<a id="retvalSection" />

### Valor devuelto

Tipo: DWORD

Si la función se ejecuta correctamente, devuelve `ERROR_SUCCESS`.

Si el mando no está conectado, la función devuelve `ERROR_DEVICE_NOT_CONNECTED`.

Si la función da error, devuelve un código de error definido en WinError.h.

<a id="remarksSection" />

## Comentarios

Esta función es similar a [XInputGetState](/reference/input/xinputongameinput/functions/xinputgetstate), pero asocia una lectura de entrada específica con un fotograma gráfico para su posterior análisis.

<Note>A partir de la versión May Preview, el comportamiento de `XInputGetStateWithToken` es idéntico al de `XInputGetState`, porque el código subyacente de GameInput no está completamente implementado.</Note>

Al proporcionar el token de canalización de fotogramas, puede correlacionar más adelante las llamadas a la API de entrada con fotogramas gráficos específicos en el software PIX.

<a id="requirementsSection" />

## Requisitos

**Encabezado:** XInputOnGameInput.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** consolas de la familia XBOX One y consolas XBOX Series

<a id="seealsoSection" />

## Consulte también

[Portabilidad de XInput a GameInput](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XInputGetState](/es/reference/input/xinputongameinput/functions/xinputgetstate.md)
- [XINPUT_STATE](/es/reference/input/xinputongameinput/structs/xinput_state.md)
- [Portabilidad de XInput a GameInput](/es/build/core-features/common/input/porting/input-porting-xinput.md)
- [XInputOnGameInput](/es/reference/input/xinputongameinput/xinputongameinput_members.md)
- [IGameInputReading::GetKeyState](/es/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getkeystate.md)
