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

# PartyLocalUser::SetCustomContext

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

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

## 構文

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

### パラメーター

**`customContext`**   void\*\
*省略可能*

プレイヤー オブジェクトと共に格納する任意のポインター サイズの値。

### 戻り値

PartyError

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

## 解説

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

## 要件

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

## 関連項目

[PartyLocalUser](/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/partylocaluser)\
[PartyLocalUser::GetCustomContext](/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_getcustomcontext)


## Related topics

- [PartyLocalUser::GetCustomContext](/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_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)
