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

# PFLobbyCreateAndJoinLobbyCompletedStateChange

> Details of the CreateAndJoinLobbyCompleted PlayFab Multiplayer state change, delivered when a client finishes creating and joining a new lobby.

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

## Syntax

```cpp theme={null}
struct PFLobbyCreateAndJoinLobbyCompletedStateChange : PFLobbyStateChange {  
    HRESULT result;  
    void* asyncContext;  
    PFLobbyHandle lobby;  
}  
```

### Members

**`result`**   HRESULT

Indicates the result of the CreateAndJoinLobby operation.

The human-readable form of this result can be retrieved via [PFMultiplayerGetErrorMessage()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage).

**`asyncContext`**   void\*

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

**`lobby`**   PFLobbyHandle\
*must not be null*

The lobby that was created and joined.

## Requirements

**Header:** PFLobby.h

## See also

[PFLobby members](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)


## Related topics

- [PFMultiplayerCreateAndJoinLobby](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayercreateandjoinlobby.md)
- [PFLobbyGetLobbyId](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetlobbyid.md)
- [Create a lobby](/services/playfab/multiplayer/lobby/create-a-lobby.md)
- [Lobby SDK Quickstart](/services/playfab/multiplayer/lobby/lobby-getting-started.md)
- [PFLobbyGetConnectionString](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetconnectionstring.md)
