XblMultiplayerSessionSetMutableRoleSettings

Sets the max member count and/or target member counts for a role.

Syntax

HRESULT XblMultiplayerSessionSetMutableRoleSettings(  
         XblMultiplayerSessionHandle handle,  
         const char* roleTypeName,  
         const char* roleName,  
         uint32_t* maxMemberCount,  
         uint32_t* targetMemberCount  
)  

Parameters

handle   _In_
Type: XblMultiplayerSessionHandle

Handle to the multiplayer session.

roleTypeName   _In_z_
Type: char*

Name of the role type for the role being modified.

roleName   _In_z_
Type: char*

Name of the role to modify.

maxMemberCount   _In_opt_
Type: uint32_t*

The maximum number of members that can have the role.

targetMemberCount   _In_opt_
Type: uint32_t*

The target number of members for the role.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

Only the session owner can modify role settings and only those that are mutable (see XblMultiplayerRoleType.MutableRoleSettings). In your session template, you also need to set 'hasOwners' capability and 'ownerManaged' to true for the specific role type that you want to modify.

Requirements

Header: multiplayer_c.h

Library: Microsoft.Xbox.Services.14x.GDK.C.lib

See also

multiplayer_c