Skip to main content
Create a new lobby as a game_server entity.

Syntax

Parameters

handle   PFMultiplayerHandle The handle of the PFMultiplayer API instance. server   PFEntityKey* The PlayFab Entity Key of the game server creating the lobby. It’s entity type must be “game_server”. createConfiguration   PFLobbyCreateConfiguration* The initial configuration data used when creating the lobby. asyncContext   void*
optional
An optional, app-defined, pointer-sized context value that can be used to associate the completion state change with this call. lobby   PFLobbyHandle*
optional, library-allocated output
The optional, output lobby object which can be used to queue operations for immediate execution of this operation completes.

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().

Remarks

To use this feature, you must define PFMULTIPLAYER_INCLUDE_SERVER_APIS before including PFLobby.h.

This is an asynchronous operation. Upon successful completion, the title will be provided a PFLobbyCreateAndClaimServerLobbyCompletedStateChange with the PFLobbyCreateAndClaimServerLobbyCompletedStateChange::result field set to S_OK. Upon a failed completion, the title will be provided a PFLobbyCreateAndClaimServerLobbyCompletedStateChange with the PFLobbyCreateAndClaimServerLobbyCompletedStateChange::result field set to a failure.

Requirements

Header: PFLobby.h

See also

PFLobby members
Last modified on August 10, 2026