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

# PFMatchmakingTicketGetCustomContext

> 检索之前通过 setter 函数与 PlayFab Multiplayer 匹配票证关联的应用私有指针大小自定义上下文值。

检索之前与此票证对象关联的应用私有自定义指针大小上下文值。

## 语法

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

### 参数

**`ticket`**   PFMatchmakingTicketHandle

匹配票证的句柄。

**`customContext`**   void\*\*\
*output, may return nullptr*

输出自定义上下文。

### 返回值

类型：HRESULT

如果成功检索到自定义上下文，则为 `S_OK`；否则为错误代码。可以通过 [PFMultiplayerGetErrorMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage.md) 获取错误代码的人类可读形式。

## 备注

如果尚未设置自定义上下文，`customContext` 所指向的值将被设置为 nullptr。

## 要求

**头文件：** PFMatchmaking.h

## 另请参阅

[PFMatchmaking 成员](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)\
[PFMatchmakingTicketSetCustomContext](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketsetcustomcontext.md)


## Related topics

- [PFMatchmakingTicketSetCustomContext](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketsetcustomcontext.md)
- [PlayFab Multiplayer C++ SDK 发行说明](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [PFMultiplayer C/C++ API 概览 - PFMatchmaking.h](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [Get Matchmaking Ticket](https://docs.xbox.com/api-reference/matchmaking/get-matchmaking-ticket.md)
- [Join Matchmaking Ticket](https://docs.xbox.com/api-reference/matchmaking/join-matchmaking-ticket.md)
