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

# PFMultiplayerDestroyMatchmakingTicket

> 終結 PlayFab Multiplayer 配對票證並釋放相關聯的資源，而不取消基礎配對服務要求。

終結配對票證。

## 語法

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

### 參數

**`handle`**   PFMultiplayerHandle

PFMultiplayer API 執行個體的控制代碼。

**`ticket`**   PFMatchmakingTicketHandle

要終結的票證。

### 傳回值

類型：HRESULT

如果呼叫成功，則為 `S_OK`；否則為錯誤碼。可透過 [PFMultiplayerGetErrorMessage()](/zh-TW/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage) 擷取錯誤碼的人類可讀形式。

## 備註

此方法會終結配對票證，並回收與其相關聯的本機資源。如果票證尚未完成，背景作業會盡最大努力嘗試一次向配對服務取消該票證。

## 需求

**標頭：** PFMatchmaking.h

## 另請參閱

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


## Related topics

- [Matchmaking SDK 快速入門](/zh-TW/services/playfab/multiplayer/matchmaking/quickstart-client-sdk.md)
- [使用伺服器回填票證 - Multiplayer SDK](/zh-TW/services/playfab/multiplayer/matchmaking/backfill-tickets-multiplayer-sdk.md)
- [PFMultiplayer C/C++ API 概觀 - PFMatchmaking.h](/zh-TW/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [PFMultiplayerCreateMatchmakingTicket](/zh-TW/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayercreatematchmakingticket.md)
- [PFMultiplayerJoinMatchmakingTicketFromId](/zh-TW/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerjoinmatchmakingticketfromid.md)
