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

# chat_user::xbox_user_id

> chat_user::xbox_user_id

# chat\_user::xbox\_user\_id

このユーザーの一意の XBOX ユーザー ID を返します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
_Ret_z_ xbox_user_id(  
)  
```

<a id="parametersSection" />

### パラメーター

なし。

<a id="retvalSection" />

### 戻り値

Type: \_Ret\_z\_

このユーザーの一意の XBOX ユーザー ID を表す null 終端文字列へのポインターを返します。

<a id="remarksSection" />

## 解説

このメソッドは、この [chat\_user](/reference/chat/gamechat2/classes/chat_user/chat_user) オブジェクトの一意の XBOX ユーザー ID を表す null 終端文字列へのポインターを返します。返される文字列ポインターのメモリは、`chat_user` オブジェクトの有効期間中、つまり [chat\_manager::remove\_user](/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_remove_user) メソッドの呼び出しによってユーザーが削除されるまで有効です。アプリのローカル [chat\_manager](/reference/chat/gamechat2/classes/chat_manager/chat_manager) インスタンスでのユーザーの管理の詳細については、「[Game Chat 2 C++ API の使用](/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2)」の「[Game Chat 2 へのユーザーの追加](/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2#adding_users_to_game_chat_2)」セクションを参照してください。

<a id="requirementsSection" />

## 要件

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

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

<a id="seealsoSection" />

## 関連項目

[Game Chat 2 の概要](/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)\
[chat\_user::custom\_user\_context](/reference/chat/gamechat2/classes/chat_user/methods/chat_user_custom_user_context)\
[chat\_user](/reference/chat/gamechat2/classes/chat_user/chat_user)


## Related topics

- [PartyXblManager::CreateRemoteChatUser](/ja-jp/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_createremotechatuser.md)
- [PartyXblChatUser::GetXboxUserId](/ja-jp/services/playfab/multiplayer/networking/xblreference/classes/PartyXblChatUser/methods/partyxblchatuser_getxboxuserid.md)
- [chat_manager::add_local_user](/ja-jp/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_add_local_user.md)
- [chat_user::chat_indicator](/ja-jp/reference/chat/gamechat2/classes/chat_user/methods/chat_user_chat_indicator.md)
- [chat_user::local](/ja-jp/reference/chat/gamechat2/classes/chat_user/methods/chat_user_local_function_2.md)
