Skip to main content

XUserFindControllerForUserWithUiResult

Retrieves the application local device ID (APP_LOCAL_DEVICE_ID) that a user has chosen to use.

Syntax

Parameters

async   _Inout_
Type: XAsyncBlock*
The async block sent to XUserFindControllerForUserWithUiAsync. deviceId   _Out_
Type: APP_LOCAL_DEVICE_ID*
The device ID of the controller that is now associated to the user.

Return value

Type: HRESULT HRESULT success or error code. For a list of error codes, see Error Codes.

Remarks

On desktop, this function will always return an all-zero device ID.

Requirements

Header: XUser.h
Library: xgameruntime.lib
Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

XUser
Dealing with Controller Loss (NDA topic)
Last modified on August 20, 2026