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

# custom_user_context

> chat_user::custom_user_context

# chat\_user::custom\_user\_context

以前このユーザーに関連付けられたアプリのオプションのプライベートなカスタム ポインター サイズのコンテキスト値を取得します。

## 構文

```cpp theme={null}
void* custom_user_context(  
)  
```

### パラメーター

なし。

### 戻り値

Type: void\*

以前このユーザーに関連付けられたポインター サイズの値。それ以外の場合は null ポインター。

## 解説

このメソッドは、以前この [chat\_user](https://docs.xbox.com/ja-jp/reference/chat/gamechat2/classes/chat_user/chat_user.md) オブジェクトに関連付けられたアプリのプライベートなカスタム ポインター サイズのコンテキスト値を取得します。この `chat_user` オブジェクトに対してカスタム ユーザー コンテキストがまだ設定されていない場合、このメソッドは null ポインターを返します。

カスタム ユーザー コンテキストは通常、マッピング参照を必要とせずに、ユーザーに関連付けられたローカルのアプリ固有のメモリへのアクセスを簡素化する「ショートカット」として使用されます。`chat_user` オブジェクトに対してカスタム ユーザー コンテキストを設定するには、[chat\_user::set\_custom\_user\_context](https://docs.xbox.com/ja-jp/reference/chat/gamechat2/classes/chat_user/methods/chat_user_set_custom_user_context.md) メソッドを使用します。

## 要件

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

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

## 関連項目

[Game Chat 2 の概要](https://docs.xbox.com/ja-jp/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md)\
[chat\_user](https://docs.xbox.com/ja-jp/reference/chat/gamechat2/classes/chat_user/chat_user.md)


## Related topics

- [set_custom_user_context](https://docs.xbox.com/ja-jp/reference/chat/gamechat2/classes/chat_user/methods/chat_user_set_custom_user_context.md)
- [xbox_user_id](https://docs.xbox.com/ja-jp/reference/chat/gamechat2/classes/chat_user/methods/chat_user_xbox_user_id.md)
- [chat_user](https://docs.xbox.com/ja-jp/reference/chat/gamechat2/classes/chat_user/chat_user.md)
- [PartyLocalUser::GetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_getcustomcontext.md)
- [PartyLocalUser::SetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_setcustomcontext.md)
