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

# PFMultiplayerStartProcessingMatchmakingStateChanges

> Retrieves the array of PlayFab Multiplayer matchmaking state changes to process since the last call, letting the title respond to ticket and match updates.

Retrieves an array of all matchmaking state changes to process since the last such call.

## Syntax

```cpp theme={null}
HRESULT PFMultiplayerStartProcessingMatchmakingStateChanges(  
    PFMultiplayerHandle handle,  
    uint32_t* stateChangeCount,  
    const PFMatchmakingStateChange* const** stateChanges  
)  
```

### Parameters

**`handle`**   PFMultiplayerHandle

The handle of the PFMultiplayer API instance.

**`stateChangeCount`**   uint32\_t\*\
*output*

The output number of PFMatchmakingStateChange entries for the title to handle in the `stateChanges` array.

**`stateChanges`**   PFMatchmakingStateChange\* const\*\*\
*library-allocated output array of size `*stateChangeCount`*

A library-allocated output array of all PFMatchmakingStateChange entries for the title to handle and then pass to [PFMultiplayerFinishProcessingMatchmakingStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerfinishprocessingmatchmakingstatechanges).

### Return value

Type: HRESULT

`S_OK` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PFMultiplayerGetErrorMessage()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage).

## Remarks

This method provides the Matchmaking library an opportunity to synchronize state with remote devices or services, and retrieves a list of all changes currently available for the title since the last call to this method. The title should use the provided array of 0 or more changes to update its own state or UI, and then call [PFMultiplayerFinishProcessingMatchmakingStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerfinishprocessingmatchmakingstatechanges) with them in a timely manner. <br /><br /> Matchmaking library state exposed by the library can change during this call, so you must be thread-safe in your use of it. PFMultiplayerStartProcessingMatchmakingStateChanges() should be called frequently-- at least once per graphics frame. It's designed to execute and return quickly such that it can be called on your main UI thread with negligible impact. For best results, you should also minimize the time you spend handling state changes before calling PFMultiplayerFinishProcessingMatchmakingStateChanges().   <br /><br /> Each state change returned by PFMultiplayerStartProcessingMatchmakingStateChanges() must be returned to PFMultiplayerFinishProcessingMatchmakingStateChanges() exactly once, but may be returned out of order and may be interleaved with state changes from other calls to PFMultiplayerStartProcessingMatchmakingStateChanges(). Any resources associated with a specific state change are guaranteed to stay valid until the state change is returned to PFMultiplayerFinishProcessingMatchmakingStateChanges().

## Requirements

**Header:** PFMatchmaking.h

## See also

[PFMatchmaking members](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members)\
[PFMatchmakingStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingstatechange)\
[PFMultiplayerFinishProcessingMatchmakingStateChanges](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerfinishprocessingmatchmakingstatechanges)


## Related topics

- [PFMultiplayerFinishProcessingMatchmakingStateChanges](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerfinishprocessingmatchmakingstatechanges.md)
- [PFMatchmakingStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingstatechange.md)
- [Async Lobby and Matchmaking C++ SDK operations guide](/services/playfab/multiplayer/lobby/lobby-and-matchmaking-client-sdk-async.md)
- [Matchmaking SDK quickstart](/services/playfab/multiplayer/matchmaking/quickstart-client-sdk.md)
- [Using Server Backfill Tickets - Multiplayer SDK](/services/playfab/multiplayer/matchmaking/backfill-tickets-multiplayer-sdk.md)
