Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 2.77 KB

File metadata and controls

63 lines (39 loc) · 2.77 KB
author title description ms.author ms.topic ms.service ms.date
ScottMunroMS
PFLobbyForceRemoveMember
Forcibly remove an entity from the lobby.
scmunro
reference
playfab
03/14/2022

PFLobbyForceRemoveMember

Forcibly remove an entity from the lobby.

Syntax

HRESULT PFLobbyForceRemoveMember(  
    PFLobbyHandle lobby,  
    const PFEntityKey* targetMember,  
    bool preventRejoin,  
    void* asyncContext  
)  

Parameters

lobby   PFLobbyHandle

The handle of the lobby.

targetMember   PFEntityKey*

The member to forcibly remove.

preventRejoin   bool

A flag indicating whether targetMember will be prevented from rejoining the lobby after being removed.

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

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

One of the local PlayFab entities present in this lobby must be the owner for this operation to succeed. If the local owning entity who initiated this operation loses their ownership status while the operation is in progress, the operation will fail asynchronously.

This is an asynchronous operation. The member removed via this method will not be removed from the lists returned by PFLobbyGetMembers until the asynchronous operation successfully completes and a PFLobbyMemberRemovedStateChange struct is provided by PFMultiplayerStartProcessingLobbyStateChanges.

Requirements

Header: PFLobby.h

See also

PFLobby members