Skip to main content

XUserGetMaxUsers

Retrieves the maximum number of users that a game session allows on the current platform.

Syntax

Parameters

maxUsers   _Out_
Type: uint32_t*
Contains the maximum number of users that a game session allows on the current platform.

Return value

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

Remarks

To retrieve the user ID for a specific user, call XUserGetId. To retrieve the state of a specific user, call XUserGetState. To retrieve the age group for a specific user, call XUserGetAgeGroup. To retrieve the max user size of a multiplayer session, call XblMultiplayerManagerGameSessionConstants.

Requirements

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

See also

XUser XUserGetId XUserGetState XUserGetAgeGroup
Last modified on August 20, 2026