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

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

## Requirements

**Header:** Party.h

## See also

[PartyDevice](/services/playfab/multiplayer/networking/reference/classes/PartyDevice/partydevice)\
[PartyDevice::GetCustomContext](/services/playfab/multiplayer/networking/reference/classes/PartyDevice/methods/partydevice_getcustomcontext)


## Related topics

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