Redigera

PFLobbyServerPostUpdateAsServer

Important

XBOX Docs are now on docs.xbox.com! This page is kept as an archive and is no longer being updated. Visit our documentation on docs.xbox.com for the latest information and updates.

Visit the latest docs on docs.xbox.com

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

Syntax

HRESULT PFLobbyServerPostUpdateAsServer(  
    PFLobbyHandle lobby,  
    const PFLobbyServerDataUpdate* serverUpdate,  
    void* asyncContext  
)  

Parameters

lobby   PFLobbyHandle

The handle of the lobby.

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

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 is provided a PFLobbyServerPostUpdateAsServerCompletedStateChange with the PFLobbyServerPostUpdateAsServerCompletedStateChange::result field set to S_OK. Upon a failed completion, the title is provided a PFLobbyServerPostUpdateAsServerCompletedStateChange with the PFLobbyServerPostUpdateAsServerCompletedStateChange::result field set to a failure. If applying the update would change the state of the lobby, the title is provided a PFLobbyUpdatedStateChange sometime afterwards.

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 is provided to the title with the updated state.

This operation is restricted to client-owned lobbies that are using connections.

Requirements

Header: PFLobby.h

See also

PFLobby members
PFLobbyPostUpdate