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

# PFLobbyServerPostUpdateAsServer

> PFLobbyServerPostUpdateAsServer reference for posting an update to a client-owned PlayFab lobby from a joined game_server via the PlayFab Multiplayer C++ SDK.

Post an update to a client-owned lobby as a joined server.

## Syntax

```cpp theme={null}
HRESULT PFLobbyServerPostUpdateAsServer(  
    PFLobbyHandle lobby,  
    const PFLobbyServerDataUpdate* serverUpdate,  
    void* asyncContext  
)  
```

### Parameters

**`lobby`**   PFLobbyHandle

The handle of the lobby.

**`serverUpdate`**   [PFLobbyServerDataUpdate\*](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverdataupdate)

An update to apply to the portion of the lobby data owned by the joined server.

**`asyncContext`**   void\*\
*optional*

An optional, app-defined, pointer-sized context value that can be used to associate the completion state change with this call.

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

To use this feature, you must define PFMULTIPLAYER\_INCLUDE\_SERVER\_APIS before including PFLobby.h. <br /><br /> This is an asynchronous operation. Upon successful completion, the title is provided a [PFLobbyServerPostUpdateAsServerCompletedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverpostupdateasservercompletedstatechange) with the [PFLobbyServerPostUpdateAsServerCompletedStateChange::result](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverpostupdateasservercompletedstatechange) field set to `S_OK`. Upon a failed completion, the title is provided a [PFLobbyServerPostUpdateAsServerCompletedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverpostupdateasservercompletedstatechange) with the [PFLobbyServerPostUpdateAsServerCompletedStateChange::result](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverpostupdateasservercompletedstatechange) field set to a failure. If applying the update would change the state of the lobby, the title is provided a [PFLobbyUpdatedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange) sometime afterwards.   <br /><br /> This operation completing successfully only indicates that the Lobby service accepted the update. The title's local view of the Lobby state doesn't reflect this update until a [PFLobbyUpdatedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange) is provided to the title with the updated state.   <br /><br /> This operation is restricted to client-owned lobbies that are using connections.

## Requirements

**Header:** PFLobby.h

## See also

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


## Related topics

- [PFLobbyServerLeaveAsServer](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverleaveasserver.md)
- [PlayFab Multiplayer C++ SDK Release Notes](/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [Lobby ownership](/services/playfab/multiplayer/lobby/owner-requirements-and-privileges.md)
- [PFMultiplayer C/C++ API overview - PFLobby.h](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
- [PFLobbyStateChangeType](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/enums/pflobbystatechangetype.md)
