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

# PartyChatControl::SetCustomContext

> このチャット コントロール オブジェクトにオプションのカスタム ポインタ サイズのコンテキスト値を構成します。

このチャット コントロール オブジェクトにオプションのカスタム ポインタ サイズのコンテキスト値を構成します。

## Syntax

```cpp theme={null}
PartyError SetCustomContext(  
    void* customContext  
)  
```

### Parameters

**`customContext`**   void\*\
*optional*

チャット コントロール オブジェクトと共に格納する、任意のポインタ サイズの値です。

### Return value

PartyError

カスタム コンテキストの構成が成功した場合は `c_partyErrorSuccess`、それ以外の場合はエラー コード。エラー コードの人間が読める形式は、[PartyManager::GetErrorMessage()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage.md) を介して取得できます。

## Remarks

カスタム コンテキストは通常、マッピング検索を必要とせずに、チャット コントロールに関連付けられたローカルなタイトル固有のメモリへのアクセスを簡素化する「ショートカット」として使用されます。この値は [GetCustomContext()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getcustomcontext.md) メソッドを使用して取得されます。\
\
&#x20;構成された値はライブラリによって不透明として扱われ、ローカル デバイス上でのみ有効です。ネットワーク経由で送信されることはありません。

## Requirements

**Header:** Party.h

## See also

[PartyChatControl](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol.md)\
[PartyChatControl::GetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getcustomcontext.md)


## Related topics

- [PartyChatControl::GetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getcustomcontext.md)
- [PartyXblChatUser::SetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/xblreference/classes/PartyXblChatUser/methods/partyxblchatuser_setcustomcontext.md)
- [PartyNetwork::SetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_setcustomcontext.md)
- [PartyInvitation::SetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyInvitation/methods/partyinvitation_setcustomcontext.md)
- [PartyDevice::SetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyDevice/methods/partydevice_setcustomcontext.md)
