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

# PFMatchmakingTicketGetMatch

> 为已完成的 PlayFab 多人游戏匹配票证提供最终的匹配详细信息，包括匹配到的成员和服务器连接信息。

如果已找到匹配，则提供该匹配。

## 语法

```cpp theme={null}
HRESULT PFMatchmakingTicketGetMatch(  
    PFMatchmakingTicketHandle ticket,  
    const PFMatchmakingMatchDetails** match  
)  
```

### 参数

**`ticket`**   PFMatchmakingTicketHandle

匹配票证的句柄。

**`match`**   [PFMatchmakingMatchDetails\*\*](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingmatchdetails)\
*library-allocated output*

找到的匹配。

### 返回值

类型：HRESULT

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

## 备注

如果票证不处于 `PFMatchmakingTicketStatus::Matched` 状态，此方法将失败。可以通过 [PFMatchmakingTicketGetStatus](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetstatus) 检索票证状态。

## 要求

**头文件：** PFMatchmaking.h

## 另请参阅

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


## Related topics

- [PFMultiplayerCreateMatchmakingTicket](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayercreatematchmakingticket.md)
- [从 MPSD 迁移到 PlayFab Multiplayer 和 MPA](/zh-CN/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [PFMultiplayerJoinMatchmakingTicketFromId](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerjoinmatchmakingticketfromid.md)
- [Matchmaking SDK 快速入门](/zh-CN/services/playfab/multiplayer/matchmaking/quickstart-client-sdk.md)
- [PFMultiplayer C/C++ API 概述 - PFMatchmaking.h](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
