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

# PartyChatControl::SetCustomContext

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

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

## Syntax

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

### Parameters

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

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

### Return value

PartyError

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

## Remarks

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

## Requirements

**Header:** Party.h

## See also

[PartyChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol)\
[PartyChatControl::GetCustomContext](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getcustomcontext)


## Related topics

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