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

# PFMatchmakingTicketSetCustomContext

> アプリケーションが後から取得できるように、PlayFab Multiplayer マッチメイキング チケットにオプションのポインター サイズのカスタム コンテキスト値を関連付けます。

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

## 構文

```cpp theme={null}
HRESULT PFMatchmakingTicketSetCustomContext(  
    PFMatchmakingTicketHandle ticket,  
    void* customContext  
)  
```

### パラメーター

**`ticket`**   PFMatchmakingTicketHandle

マッチメイキング チケットのハンドルです。

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

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

### 戻り値

型: HRESULT

カスタム コンテキストの構成が成功した場合は `S_OK`、それ以外の場合はエラー コード。エラー コードを人間が読める形式で取得するには、[PFMultiplayerGetErrorMessage()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage.md) を使用します。

\u0001\u0001\u0001## 解説

カスタム コンテキストは通常、マッピングの参照を必要とせずにマッチメイキング チケットに関連付けられたローカルなタイトル固有のメモリへのアクセスを簡略化する "ショートカット" として使用されます。値は [PFMatchmakingTicketGetCustomContext()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetcustomcontext.md) メソッドを使用して取得します。\
\
&#x20;構成された値はライブラリからは不透明として扱われ、ローカル デバイスでのみ有効です。ネットワークを介して送信されることはありません。

## 要件

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

## 関連項目

[PFMatchmaking のメンバー](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)\
[PFMatchmakingTicketGetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetcustomcontext.md)


## Related topics

- [PFMatchmakingTicketGetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetcustomcontext.md)
- [PlayFab Multiplayer C++ SDK リリース ノート](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [PFMultiplayer C/C++ API の概要 - PFMatchmaking.h](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [Join Matchmaking Ticket](https://docs.xbox.com/api-reference/matchmaking/join-matchmaking-ticket.md)
- [Cancel Matchmaking Ticket](https://docs.xbox.com/api-reference/matchmaking/cancel-matchmaking-ticket.md)
