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

# 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\*](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/pfentitykey_clientsdk)

The local user posting the update.

**`lobbyUpdate`**   [PFLobbyDataUpdate\*](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbydataupdate)\
*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\*](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbymemberdataupdate)\
*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()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage).

## Remarks

This is an asynchronous operation. Upon successful completion, the title will be provided a [PFLobbyPostUpdateCompletedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbypostupdatecompletedstatechange) with the [PFLobbyPostUpdateCompletedStateChange::result](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbypostupdatecompletedstatechange) field set to `S_OK`. Upon a failed completion, the title will be provided a [PFLobbyPostUpdateCompletedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbypostupdatecompletedstatechange) with the [PFLobbyPostUpdateCompletedStateChange::result](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbypostupdatecompletedstatechange) field set to a failure. If applying the update would change the state of the lobby, the title will be 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 has accepted the update. The title's local view of the Lobby state will not 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 /> 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.   <br /><br /> 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](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)\
[PFLobbyServerPostUpdate](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdate)


## Related topics

- [PFLobbyServerPostUpdate](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdate.md)
- [PFLobbyServerPostUpdateAsServer](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdateasserver.md)
- [Moving from MPSD to PlayFab Multiplayer and MPA](/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [PlayFab Multiplayer C++ SDK Release Notes](/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [PFMultiplayer C/C++ API overview - PFLobby.h](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
