PFMultiplayerJoinLobby

作为本地 PlayFab 实体加入大厅。

语法

HRESULT PFMultiplayerJoinLobby(  
    PFMultiplayerHandle handle,  
    const PFEntityKey* newMember,  
    const char* connectionString,  
    const PFLobbyJoinConfiguration* configuration,  
    void* asyncContext,  
    PFLobbyHandle* lobby  
)  

参数

handle PFMultiplayerHandle

PFMultiplayer API 实例的句柄。

newMemberPFEntityKey*

加入大厅的本地实体。

connectionString char*
以 null 结尾

实体用于加入大厅的连接字符串。

configurationPFLobbyJoinConfiguration*

加入大厅时使用的初始配置数据。

asyncContext void*
可选

一个可选应用定义的指针大小的上下文值,可用于将完成状态更改与此调用关联起来。

lobby PFLobbyHandle*
可选、库分配的输出

可用于将操作排队以立即执行此操作的可选输出大厅对象完成。

返回值

类型:HRESULT

如果调用成功,则为 S_OK,否则为错误代码。 可通过 PFMultiplayerGetErrorMessage() 检索错误代码的可读形式。

备注

这是一个异步操作。 成功完成后,将向游戏提供 PFLobbyMemberAddedStateChange 后跟 PFLobbyUpdatedStateChangePFLobbyJoinLobbyCompletedStateChangePFLobbyJoinLobbyCompletedStateChange::result 字段设置为 S_OK。 完成失败后,将向游戏提供 PFLobbyJoinLobbyCompletedStateChangePFLobbyJoinLobbyCompletedStateChange::result 字段设置为失败。

要求

标头: PFLobby.h

另请参阅

PFLobby 成员