> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblMultiplayerSessionSetMutableRoleSettings

> XblMultiplayerSessionSetMutableRoleSettings

# XblMultiplayerSessionSetMutableRoleSettings

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

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerSessionSetMutableRoleSettings(  
         XblMultiplayerSessionHandle handle,  
         const char* roleTypeName,  
         const char* roleName,  
         uint32_t* maxMemberCount,  
         uint32_t* targetMemberCount  
)  
```

### Parameters

*handle*   \_In\_\
Type: [XblMultiplayerSessionHandle](/reference/live/xsapi-c/multiplayer_c/handles/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](/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members)
