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

# PFMatchmakingTicketCompletedStateChange

> Details of the TicketCompleted PlayFab Multiplayer state change, raised when a matchmaking ticket has finished either by matching, canceling, or failing.

Information specific to the *TicketCompleted* type of state change.

## Syntax

```cpp theme={null}
struct PFMatchmakingTicketCompletedStateChange : PFMatchmakingStateChange {  
    HRESULT result;  
    PFMatchmakingTicketHandle ticket;  
    void* asyncContext;  
}  
```

### Members

**`result`**   HRESULT

An error code indicating whether the ticket succeeded or, if it failed, why it failed.

**`ticket`**   PFMatchmakingTicketHandle\
*must not be null*

The matchmaking ticket that completed.

**`asyncContext`**   void\*

The async context provided to the call associated with this state change.

## Requirements

**Header:** PFMatchmaking.h

## See also

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


## Related topics

- [PFMatchmakingStateChangeType](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/enums/pfmatchmakingstatechangetype.md)
- [PFMatchmakingTicketCancel](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketcancel.md)
- [PFMultiplayer C/C++ API overview - PFMatchmaking.h](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [PFMatchmakingTicketStatusChangedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingticketstatuschangedstatechange.md)
- [Matchmaking SDK quickstart](/services/playfab/multiplayer/matchmaking/quickstart-client-sdk.md)
