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

# PFMatchmakingTicketCancel

> Cancela um tíquete de matchmaking do PlayFab Multiplayer em andamento, interrompendo a busca por uma partida e fazendo o tíquete passar para o status cancelado.

Cancela o tíquete.

## Sintaxe

```cpp theme={null}
HRESULT PFMatchmakingTicketCancel(  
    PFMatchmakingTicketHandle ticket  
)  
```

### Parâmetros

**`ticket`**   PFMatchmakingTicketHandle

O identificador do tíquete de matchmaking.

### Valor retornado

Tipo: HRESULT

`S_OK` se a chamada tiver êxito ou um código de erro caso contrário. A forma legível do código de erro pode ser obtida por meio de [PFMultiplayerGetErrorMessage()](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage).

## Comentários

Este método enfileira uma operação assíncrona para cancelar este tíquete de matchmaking. Em caso de êxito, uma [PFMatchmakingTicketCompletedStateChange](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingticketcompletedstatechange) será fornecida indicando que o tíquete foi cancelado. <br /><br /> Este método não garante que o tíquete será cancelado. O tíquete pode ser concluído antes que o cancelamento possa ser processado, ou a solicitação de cancelamento pode falhar devido a erros de rede ou do serviço. Se a tentativa de cancelamento falhar, mas puder ser repetida, a biblioteca continuará tentando o cancelamento. Caso contrário, será fornecida uma [PFMatchmakingTicketCompletedStateChange](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingticketcompletedstatechange) indicando que o tíquete falhou.

## Requisitos

**Cabeçalho:** PFMatchmaking.h

## Confira também

[Membros do PFMatchmaking](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members)


## Related topics

- [Início rápido do SDK de Matchmaking](/pt-BR/services/playfab/multiplayer/matchmaking/quickstart-client-sdk.md)
- [Usando tíquetes de preenchimento de servidor - Multiplayer SDK](/pt-BR/services/playfab/multiplayer/matchmaking/backfill-tickets-multiplayer-sdk.md)
- [Notas de versão do SDK C++ do PlayFab Multiplayer](/pt-BR/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [Visão geral da API C/C++ do PFMultiplayer – PFMatchmaking.h](/pt-BR/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [Cancel Matchmaking Ticket](/api-reference/matchmaking/cancel-matchmaking-ticket.md)
