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

# XUserGetMaxUsers

> XUserGetMaxUsers

# XUserGetMaxUsers

現在のプラットフォームでゲーム セッションが許可する最大ユーザー数を取得します。

## 構文

```cpp theme={null}
HRESULT XUserGetMaxUsers(  
         uint32_t* maxUsers  
)  
```

### パラメーター

*maxUsers*   \_Out\_\
Type: uint32\_t\*

現在のプラットフォームでゲーム セッションが許可する最大ユーザー数が格納されます。

### 戻り値

Type: HRESULT

HRESULT の成功またはエラー コード。\
エラー コードの一覧については、[エラー コード](https://docs.xbox.com/ja-jp/reference/errorcodes.md) を参照してください。

## 解説

特定のユーザーのユーザー ID を取得するには、[XUserGetId](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xusergetid.md) を呼び出します。

特定のユーザーの状態を取得するには、[XUserGetState](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xusergetstate.md) を呼び出します。

特定のユーザーの年齢グループを取得するには、[XUserGetAgeGroup](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xusergetagegroup.md) を呼び出します。

マルチプレイヤー セッションの最大ユーザー サイズを取得するには、[XblMultiplayerManagerGameSessionConstants](https://docs.xbox.com/ja-jp/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionconstants.md) を呼び出します。

## 要件

**ヘッダー:** XUser.h

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、Steam Deck、XBOX One ファミリ本体および XBOX Series 本体

## 関連項目

[XUser](https://docs.xbox.com/ja-jp/reference/system/xuser/xuser_members.md)

[XUserGetId](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xusergetid.md)

[XUserGetState](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xusergetstate.md)

[XUserGetAgeGroup](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xusergetagegroup.md)


## Related topics

- [XUser (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xuser/xuser_members.md)
- [GET (/users/xuid({xuid})/history/titles)](https://docs.xbox.com/ja-jp/reference/live/rest/uri/titlehistory/uri-titlehistoryusersxuidhistorytitlesgetv2.md)
- [GET (/users/xuid({xuid})/inbox)](https://docs.xbox.com/ja-jp/reference/live/rest/uri/users/uri-usersxuidinboxget.md)
- [MaxUserQuota 要素 (MicrosoftGame.config)](https://docs.xbox.com/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-maxuserquota.md)
- [GET (/users/xuid({xuid})/achievements)](https://docs.xbox.com/ja-jp/reference/live/rest/uri/achievements/uri-achievementsusersxuidachievementsgetv2.md)
