XUserFindForDevice
Retrieves the user ID for a specific device ID.Syntax
Parameters
deviceId _In_Type: APP_LOCAL_DEVICE_ID* The ID of the device.
handle _Out_
Type: XUserHandle* Contains the XUID for the local user.
Return value
Type: HRESULT Returns S_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes.Remarks
This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
- The user signs out from the console.
- Someone uses the input device to select a different user in the Account Picker.
XUserFindForDevice cannot return a user handle to a user that hasn’t been signed in with a call to XUserAddAsync. See Users and input devices for more information.
