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

# PFMatchmakingTicketGetCustomContext

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

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

## 语法

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

### 参数

**`ticket`**   PFMatchmakingTicketHandle

匹配票证的句柄。

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

输出自定义上下文。

### 返回值

类型：HRESULT

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

## 备注

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

## 要求

**头文件：** PFMatchmaking.h

## 另请参阅

[PFMatchmaking 成员](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members)\
[PFMatchmakingTicketSetCustomContext](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketsetcustomcontext)


## Related topics

- [PFMatchmakingTicketSetCustomContext](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketsetcustomcontext.md)
- [PlayFab Multiplayer C++ SDK 发行说明](/zh-CN/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [PFMultiplayer C/C++ API 概述 - PFMatchmaking.h](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [XblMatchmakingGetMatchTicketDetailsAsync](/zh-CN/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakinggetmatchticketdetailsasync.md)
- [PFMatchmakingTicketGetTicketId](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetticketid.md)
