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

# XUserFindControllerForUserWithUiResult

> XUserFindControllerForUserWithUiResult

# XUserFindControllerForUserWithUiResult

ユーザーが使用することを選んだアプリケーションのローカル デバイス ID (APP\_LOCAL\_DEVICE\_ID) を取得します。

## 構文

```cpp theme={null}
HRESULT XUserFindControllerForUserWithUiResult(  
         XAsyncBlock* async,  
         APP_LOCAL_DEVICE_ID* deviceId  
)  
```

### パラメーター

*async*   \_Inout\_\
Type: XAsyncBlock\*

[XUserFindControllerForUserWithUiAsync](/reference/system/xuser/functions/xuserfindcontrollerforuserwithuiasync) に渡された非同期ブロックです。

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

現在ユーザーに関連付けられているコントローラーのデバイス ID です。

### 戻り値

Type: HRESULT

HRESULT の成功またはエラー コード。エラー コードの一覧については、[エラー コード](/reference/errorcodes) を参照してください。

### 解説

デスクトップでは、この関数は常にすべてがゼロのデバイス ID を返します。

## 要件

**ヘッダー:** XUser.h\
**ライブラリ:** xgameruntime.lib\
**サポートされているプラットフォーム:** Windows、XBOX One ファミリ本体および XBOX Series 本体

## 関連項目

[XUser](/reference/system/xuser/xuser_members)\
[コントローラーの喪失への対応 (NDA topic)](/build/core-features/common/user/users-dealing-with-controller-loss)


## Related topics

- [XUserFindControllerForUserWithUiAsync](/ja-jp/reference/system/xuser/functions/xuserfindcontrollerforuserwithuiasync.md)
- [コントローラー損失への対処](/ja-jp/build/core-features/common/user/users-dealing-with-controller-loss.md)
- [XUser](/ja-jp/reference/system/xuser/xuser_members.md)
- [GDK 向け Unity C# API ラッパー](/ja-jp/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XUserResolveIssueWithUiResult](/ja-jp/reference/system/xuser/functions/xuserresolveissuewithuiresult.md)
