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

指定されたコントローラーの現在の状態を取得し、D3DX フレーム パイプライン トークンに関連付けます。

<a id="syntaxSection" />

## 構文

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

<a id="parametersSection" />

### パラメーター

*dwUserIndex*   \_In\_\
型: DWORD

デバイスに関連付けられているゲーマーのインデックス。0 ～ `XUSER_MAX_COUNT - 1` の範囲の値。

*framePipelineToken*   \_In\_\
型: UINT64

D3DX フレーム パイプライン トークン。

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

コントローラーの現在の状態を受け取る [XINPUT\_STATE](/reference/input/xinputongameinput/structs/xinput_state) オブジェクトへのポインター。

<a id="retvalSection" />

### 戻り値

型: DWORD

関数が成功した場合、`ERROR_SUCCESS` を返します。

コントローラーが接続されていない場合、関数は `ERROR_DEVICE_NOT_CONNECTED` を返します。

関数が失敗した場合は、WinError.h で定義されているエラー コードを返します。

<a id="remarksSection" />

## 解説

この関数は [XInputGetState](/reference/input/xinputongameinput/functions/xinputgetstate) と似ていますが、特定の入力読み取りをグラフィックス フレームに関連付けて後で分析できるようにします。

<Note>5 月のプレビュー リリース時点では、基になる GameInput コードが完全には実装されていないため、`XInputGetStateWithToken` の動作は `XInputGetState` と同一です。</Note>

フレーム パイプライン トークンを指定することで、後で PIX ソフトウェアの特定のグラフィックス フレームと入力 API 呼び出しを関連付けることができます。

<a id="requirementsSection" />

## 要件

**ヘッダー:** XInputOnGameInput.h

**ライブラリ:** xgameruntime.lib

**対応プラットフォーム:** XBOX One ファミリー本体および XBOX Series 本体

<a id="seealsoSection" />

## 関連項目

[XInput から GameInput への移植](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XINPUT_STATE](/ja-jp/reference/input/xinputongameinput/structs/xinput_state.md)
- [XInputGetState](/ja-jp/reference/input/xinputongameinput/functions/xinputgetstate.md)
- [XInput から GameInput への移植](/ja-jp/build/core-features/common/input/porting/input-porting-xinput.md)
- [XInputOnGameInput](/ja-jp/reference/input/xinputongameinput/xinputongameinput_members.md)
- [IGameInputReading::GetTouchState](/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_gettouchstate.md)
