> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFLobbyPostUpdate

> PFLobbyPostUpdate reference for posting a lobby or member data update as a player from the client using the PlayFab Multiplayer C++ SDK async lobby APIs.

Post an update to the lobby as a player.

## Syntax

```cpp theme={null}
HRESULT PFLobbyPostUpdate(  
    PFLobbyHandle lobby,  
    const PFEntityKey* localUser,  
    const PFLobbyDataUpdate* lobbyUpdate,  
    const PFLobbyMemberDataUpdate* memberUpdate,  
    void* asyncContext  
)  
```

### Parameters

**`lobby`**   PFLobbyHandle

The handle of the lobby.

**`localUser`**   [PFEntityKey\*](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/pfentitykey_clientsdk.md)

The local user posting the update.

**`lobbyUpdate`**   [PFLobbyDataUpdate\*](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbydataupdate.md)\
*optional*

An optional update to apply to the shared portion of the lobby on behalf of `localUser`. If this is not provided, `memberUpdate` must be provided.

**`memberUpdate`**   [PFLobbyMemberDataUpdate\*](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbymemberdataupdate.md)\
*optional*

An optional update to apply to the portion of the lobby owned by `localUser`. If this parameter is not provided, `lobbyUpdate` must be provided.

**`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()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage.md).

## Remarks

This is an asynchronous operation. Upon successful completion, the title will be provided a [PFLobbyPostUpdateCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbypostupdatecompletedstatechange.md) with the [PFLobbyPostUpdateCompletedStateChange::result](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbypostupdatecompletedstatechange.md) field set to `S_OK`. Upon a failed completion, the title will be provided a [PFLobbyPostUpdateCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbypostupdatecompletedstatechange.md) with the [PFLobbyPostUpdateCompletedStateChange::result](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbypostupdatecompletedstatechange.md) field set to a failure. If applying the update would change the state of the lobby, the title will be provided a [PFLobbyUpdatedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md) sometime afterwards. \
\
&#x20;This operation completing successfully only indicates that the Lobby service has accepted the update. The title's local view of the Lobby state will not reflect this update until a [PFLobbyUpdatedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md) is provided to the title with the updated state.   \
\
&#x20;The `lobbyUpdate` contains fields that can only be modified by the owner of the lobby. This method will return an error if one of those fields is specified and `localUser` is not the owner of the lobby.   \
\
&#x20;If both a `lobbyUpdate` and `memberUpdate` are supplied to this method on behalf of a single entity, both updates will happen atomically.

## Requirements

**Header:** PFLobby.h

## See also

[PFLobby members](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)\
[PFLobbyServerPostUpdate](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdate.md)


## Related topics

- [PFLobbyServerPostUpdate](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdate.md)
- [PFLobbyServerPostUpdateAsServer](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdateasserver.md)
- [Moving from MPSD to PlayFab Multiplayer and MPA](https://docs.xbox.com/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [PlayFab Multiplayer C++ SDK Release Notes](https://docs.xbox.com/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [Asynchronous Lobby and Matchmaking C++ SDK operations and notifications](https://docs.xbox.com/services/playfab/multiplayer/lobby/lobby-and-matchmaking-client-sdk-async.md)
