Editar

Compartir vía


PFMultiplayerStartListeningForLobbyInvites

Enables the Lobby invite listener for a given entity.

Syntax

HRESULT PFMultiplayerStartListeningForLobbyInvites(  
    PFMultiplayerHandle handle,  
    const PFEntityKey* listeningEntity  
)  

Parameters

handle   PFMultiplayerHandle

The handle of the PFMultiplayer API instance.

listeningEntity   PFEntityKey*

The entity which will listen for invites.

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 operation will synchronously start listening for invites on behalf of the provided entity. When invites are received, they will be provided via PFLobbyInviteReceivedStateChange structs. When the status of the invite listener changes, notifications will be provided via PFLobbyInviteListenerStatusChangedStateChange structs.

Only invites sent after the listener has been started will be received on this client. Invites sent while this listener is not active will not be queued.

Invite listening is, by default, disabled for all entities. This method should be called for each local entity that the title wants to receive Lobby invites.

Lobby invites and this invite listener are unrelated to and unaffected by platform invite mechanisms.

This method may only be called if the Lobby invite listener is not already enabled for the given entity.

Requirements

Header: PFLobby.h

See also

PFLobby members