Skip to main content

XUserGetState

Retrieves the state of a user.

Syntax

Parameters

user   _In_
Type: XUserHandle
A handle to the user to retrieve the state for. state   _Out_
Type: XUserState*
Contains the state of a specific user.

Return value

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

Remarks

A user can exist in three states within a game title. For details, visit XUserState. To monitor changes to a user’s state or information, call the XUserRegisterForChangeEvent function. The function subscribes to an XUserChangeEvent enumeration.

Requirements

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

See also

XUser XUserState XUserRegisterForChangeEvent XUserChangeEvent
Last modified on August 20, 2026