> ## 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.

# XUserGetMaxUsers

> XUserGetMaxUsers

# XUserGetMaxUsers

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

## 構文

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

### パラメーター

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

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

### 戻り値

Type: HRESULT

HRESULT の成功またはエラー コード。\
エラー コードの一覧については、[エラー コード](/reference/errorcodes) を参照してください。

## 解説

特定のユーザーのユーザー ID を取得するには、[XUserGetId](/reference/system/xuser/functions/xusergetid) を呼び出します。

特定のユーザーの状態を取得するには、[XUserGetState](/reference/system/xuser/functions/xusergetstate) を呼び出します。

特定のユーザーの年齢グループを取得するには、[XUserGetAgeGroup](/reference/system/xuser/functions/xusergetagegroup) を呼び出します。

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

## 要件

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

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

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

## 関連項目

[XUser](/reference/system/xuser/xuser_members)

[XUserGetId](/reference/system/xuser/functions/xusergetid)

[XUserGetState](/reference/system/xuser/functions/xusergetstate)

[XUserGetAgeGroup](/reference/system/xuser/functions/xusergetagegroup)


## Related topics

- [XUser](/ja-jp/reference/system/xuser/xuser_members.md)
- [MicrosoftGame.config 要素 - MaxUserQuota](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-maxuserquota.md)
- [XUserGetDefaultAudioEndpointUtf16](/ja-jp/reference/system/xuser/functions/xusergetdefaultaudioendpointutf16.md)
- [XUserGetGamertag](/ja-jp/reference/system/xuser/functions/xusergetgamertag.md)
- [XUserGetId](/ja-jp/reference/system/xuser/functions/xusergetid.md)
