> ## 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\_\
類型：void\*

要為 `chat_user` 物件儲存的任意指標大小值。

<a id="retvalSection" />

### 傳回值

類型：void

無。

<a id="remarksSection" />

## 備註

此方法會設定應用程式針對此 [chat\_user](/zh-TW/reference/chat/gamechat2/classes/chat_user/chat_user) 物件的選用、私人、自訂指標大小內容值。自訂使用者內容通常用來作為「捷徑」，可簡化存取與使用者相關聯的本機、應用程式特定記憶體，而不需要進行對應查閱。請使用 [chat\_user::custom\_user\_context](/zh-TW/reference/chat/gamechat2/classes/chat_user/methods/chat_user_custom_user_context) 方法來擷取 `chat_user` 物件的自訂使用者內容。

Game Chat 2 程式庫會將自訂使用者內容視為不透明，且它只在本機裝置上有效；不會透過網路傳輸。

<a id="requirementsSection" />

## 需求

**標頭：** GameChat2.h

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[Game Chat 2 簡介](/zh-TW/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)\
[chat\_user](/zh-TW/reference/chat/gamechat2/classes/chat_user/chat_user)


## Related topics

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