XUserGetState

Retrieves the state of a user.

Syntax

HRESULT XUserGetState(  
         XUserHandle user,  
         XUserState* state  
)  

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, Xbox One family consoles and Xbox Series consoles

See also

XUser

XUserState

XUserRegisterForChangeEvent

XUserChangeEvent