Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Shows a dialog that will prompt the user to turn on and identify which controller they want to use.
Syntax
HRESULT XUserFindControllerForUserWithUiAsync(
XUserHandle user,
XAsyncBlock* async
)
Parameters
user _In_
Type: XUserHandle
The XUserHandle of the user for which to find a controller.
async _In_
Type: XAsyncBlock*
An XAsyncBlock for polling for the call's status and retrieving call results.
Return value
Type: HRESULT
HRESULT success or error code. For a list of error codes, see Error Codes.
Remarks
On desktop, this function will not show UI.
To get the results of what controller the user has selected, there are a couple of choices.
- Call XUserFindControllerForUserWithUiResult. This will return the device ID of the now bound controller.
- Get the result from the XUserDeviceAssociationChangedCallback callback that will happen when the user has selected their new controller.
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)Autorisierung erforderlich