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

# PartyDevice::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/PartyDevice/methods/partydevice_getcustomcontext.md) メソッドを使用して取得されます。\
\
&#x20;構成された値はライブラリによって不透明として扱われ、ローカル デバイス上でのみ有効です。ネットワーク経由で送信されることはありません。

## Requirements

**Header:** Party.h

## See also

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


## Related topics

- [PartyDevice::GetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyDevice/methods/partydevice_getcustomcontext.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)
- [PartyEndpoint::SetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_setcustomcontext.md)
- [PartyChatControl::SetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_setcustomcontext.md)
