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

# PFMultiplayerDestroyMatchmakingTicket

> 销毁 PlayFab 多人游戏匹配票证并释放相关资源，但不会取消底层的匹配服务请求。

销毁匹配票证。

## 语法

```cpp theme={null}
HRESULT PFMultiplayerDestroyMatchmakingTicket(  
    PFMultiplayerHandle handle,  
    PFMatchmakingTicketHandle ticket  
)  
```

### 参数

**`handle`**   PFMultiplayerHandle

PFMultiplayer API 实例的句柄。

**`ticket`**   PFMatchmakingTicketHandle

要销毁的票证。

### 返回值

类型：HRESULT

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

## 备注

此方法销毁匹配票证并回收与之关联的本地资源。如果票证尚未完成，后台操作将执行一次尽力而为的尝试，以在匹配服务中取消该票证。

## 要求

**头文件：** PFMatchmaking.h

## 另请参阅

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


## Related topics

- [Matchmaking SDK 快速入门](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/matchmaking/quickstart-client-sdk.md)
- [使用服务器回填票证 - Multiplayer SDK](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/matchmaking/backfill-tickets-multiplayer-sdk.md)
- [PFMultiplayer C/C++ API 概览 - PFMatchmaking.h](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [PFMultiplayerCreateMatchmakingTicket](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayercreatematchmakingticket.md)
- [PFMultiplayerJoinMatchmakingTicketFromId](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerjoinmatchmakingticketfromid.md)
