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

# PFLobbySetCustomContext

> PlayFab Multiplayer C++ SDK API を使用して、アプリ定義のポインター コンテキスト値を PlayFab ロビー ハンドルに関連付けるための PFLobbySetCustomContext リファレンス。

このロビー オブジェクトに、省略可能でカスタムなポインター サイズのコンテキスト値を構成します。

## 構文

```cpp theme={null}
HRESULT PFLobbySetCustomContext(  
    PFLobbyHandle lobby,  
    void* customContext  
)  
```

### パラメーター

**`lobby`**   PFLobbyHandle

ロビーのハンドル。

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

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

### 戻り値

型: HRESULT

カスタム コンテキストの構成が成功した場合は `S_OK`、それ以外の場合はエラー コード。エラー コードの人間が判読可能な形式は、[PFMultiplayerGetErrorMessage()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage) を通じて取得できます。

## 解説

カスタム コンテキストは通常、マッピング検索を必要とせずに、ロビーに関連付けられたローカルなタイトル固有メモリへのアクセスを簡略化する「ショートカット」として使用されます。値は、[PFLobbyGetCustomContext()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetcustomcontext) メソッドを使って取得します。<br /><br /> 構成された任意の値はライブラリからは不透明として扱われ、ローカル デバイス上でのみ有効です。ネットワーク経由では送信されません。

## 要件

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

## 関連項目

[PFLobby メンバー](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)\
[PFLobbyGetCustomContext](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetcustomcontext)


## Related topics

- [PFLobbyGetCustomContext](/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetcustomcontext.md)
- [PFMatchmakingTicketSetCustomContext](/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketsetcustomcontext.md)
- [chat_user::set_custom_user_context](/ja-jp/reference/chat/gamechat2/classes/chat_user/methods/chat_user_set_custom_user_context.md)
- [pre_encode_audio_stream::set_custom_stream_context](/ja-jp/reference/chat/gamechat2/classes/pre_encode_audio_stream/methods/pre_encode_audio_stream_set_custom_stream_context.md)
- [PartyDevice::SetCustomContext](/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyDevice/methods/partydevice_setcustomcontext.md)
