> ## 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::set_custom_user_context

> chat_user::set_custom_user_context

# chat\_user::set\_custom\_user\_context

このユーザーに対して、アプリのオプションのプライベートなカスタム ポインター サイズのコンテキスト値を設定します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
void set_custom_user_context(  
    void* customUserContext  
)  
```

<a id="parametersSection" />

### パラメーター

*customUserContext*   \_In\_opt\_\
Type: void\*

`chat_user` オブジェクトに保存する任意のポインター サイズの値。

<a id="retvalSection" />

### 戻り値

Type: void

なし。

<a id="remarksSection" />

## 解説

このメソッドは、この [chat\_user](/reference/chat/gamechat2/classes/chat_user/chat_user) オブジェクトに対して、アプリのオプションのプライベートなカスタム ポインター サイズのコンテキスト値を設定します。カスタム ユーザー コンテキストは通常、マッピング参照を必要とせずに、ユーザーに関連付けられたローカルのアプリ固有のメモリへのアクセスを簡素化する「ショートカット」として使用されます。`chat_user` オブジェクトのカスタム ユーザー コンテキストを取得するには、[chat\_user::custom\_user\_context](/reference/chat/gamechat2/classes/chat_user/methods/chat_user_custom_user_context) メソッドを使用します。

カスタム ユーザー コンテキストは、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](/reference/chat/gamechat2/classes/chat_user/chat_user)


## Related topics

- [chat_user::custom_user_context](/ja-jp/reference/chat/gamechat2/classes/chat_user/methods/chat_user_custom_user_context.md)
- [chat_user_local::set_remote_user_muted](/ja-jp/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_set_remote_user_muted.md)
- [chat_user_local::set_microphone_muted](/ja-jp/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_set_microphone_muted.md)
- [PartyXblChatUser::SetCustomContext](/ja-jp/services/playfab/multiplayer/networking/xblreference/classes/PartyXblChatUser/methods/partyxblchatuser_setcustomcontext.md)
- [chat_user_local::set_communication_relationship](/ja-jp/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_set_communication_relationship.md)
