Redigera

PFMultiplayerFindLobbies

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

Search for lobbies on behalf of the local user.

Syntax

HRESULT PFMultiplayerFindLobbies(  
    PFMultiplayerHandle handle,  
    const PFEntityKey* searchingEntity,  
    const PFLobbySearchConfiguration* searchConfiguration,  
    void* asyncContext  
)  

Parameters

handle   PFMultiplayerHandle

The handle of the PFMultiplayer API instance.

searchingEntity   const PFEntityKey*

The PlayFab entity performing the search.

searchConfiguration   const PFLobbySearchConfiguration*

The configuration used to filter and sort the searched lobbies.

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 PFLobbyFindLobbiesCompletedStateChange with the PFLobbyFindLobbiesCompletedStateChange::result field set to S_OK. Upon a failed completion, the title will be provided a PFLobbyFindLobbiesCompletedStateChange with the PFLobbyFindLobbiesCompletedStateChange::result field set to a failure.

Before you call this function, call PFMultiplayerSetEntityToken for searchingEntity. If no token is set for that entity, the call fails synchronously.

Requirements

Header: PFLobby.h

See also

PFLobby members