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

# PFMultiplayerFinishProcessingLobbyStateChanges

> PFMultiplayerFinishProcessingLobbyStateChanges reference for returning previously delivered lobby state change entries in the PlayFab Multiplayer C++ SDK.

Returns an array of PFLobbyStateChanges that were being processed.

## Syntax

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

### Parameters

**`handle`**   PFMultiplayerHandle

The handle of the PFMultiplayer API instance.

**`stateChangeCount`**   uint32\_t

The number of changes, provided in the list specified by `stateChanges`, previously returned by [PFMultiplayerStartProcessingLobbyStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges) that have now been handled by the title.

**`stateChanges`**   PFLobbyStateChange\* const\*\
*input array of size `stateChangeCount`*

The array of changes previously returned by [PFMultiplayerStartProcessingLobbyStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges) that have now been handled by the title.

### 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 informs the Lobby library that the state changes reported by a previous call to [PFMultiplayerStartProcessingLobbyStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges) have now been handled by the title, so their associated resources can be reclaimed. You may call PFMultiplayerFinishProcessingLobbyStateChanges() with any number of state changes. Each state change returned by PFMultiplayerStartProcessingLobbyStateChanges() must be returned to PFMultiplayerFinishProcessingLobbyStateChanges() exactly once, but may be returned out of order and may be interleaved with state changes from other calls to PFMultiplayerStartProcessingLobbyStateChanges(). <br /><br /> Any resources associated with a specific state change are guaranteed to stay valid until the state change is returned to PFMultiplayerFinishProcessingLobbyStateChanges().   <br /><br /> For best results, you should minimize the time you spend handling state changes before calling PFMultiplayerFinishProcessingLobbyStateChanges().

## Requirements

**Header:** PFLobby.h

## See also

[PFLobby members](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)\
[PFLobbyStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbystatechange)\
[PFMultiplayerStartProcessingLobbyStateChanges](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges)


## Related topics

- [PFMultiplayerStartProcessingLobbyStateChanges](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges.md)
- [PFLobbyStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbystatechange.md)
- [PFLobbyDisconnectedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbydisconnectedstatechange.md)
- [Moving from MPSD to PlayFab Multiplayer and MPA](/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [PFMultiplayerFinishProcessingMatchmakingStateChanges](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmultiplayerfinishprocessingmatchmakingstatechanges.md)
