> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFLobbyJoinLobbyAsServerCompletedStateChange

> JoinLobbyAsServerCompleted PlayFab Multiplayer 状态变更详细信息，在游戏服务器完成加入客户端拥有的大厅时引发。

*JoinLobbyAsServerCompleted* 类型状态变更的特定信息。

## 语法

```cpp theme={null}
struct PFLobbyJoinLobbyAsServerCompletedStateChange : PFLobbyStateChange {  
    HRESULT result;  
    PFEntityKey newServer;  
    void* asyncContext;  
    PFLobbyHandle lobby;  
}  
```

### 成员

**`result`**   HRESULT

指示 PFMultiplayerJoinLobbyAsServer() 操作的结果。

可以通过 [PFMultiplayerGetErrorMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage.md) 获取此结果的人类可读形式。

**`newServer`**   [PFEntityKey](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/pfentitykey_clientsdk.md)

提供给与此状态变更相关联的调用的服务器实体 — 即正在加入大厅的实体。

**`asyncContext`**   void\*

提供给与此状态变更相关联的调用的异步上下文。

**`lobby`**   PFLobbyHandle\
*must not be null*

已加入的大厅。

## 备注

若要使用此功能，必须在包含 PFLobby.h 之前定义 PFMULTIPLAYER\_INCLUDE\_SERVER\_APIS。

## 要求

**头文件：** PFLobby.h

## 另请参阅

[PFLobby 成员](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)


## Related topics

- [PFMultiplayerJoinLobbyAsServer](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerjoinlobbyasserver.md)
- [PFLobbyGetLobbyId](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetlobbyid.md)
- [PFMultiplayer C/C++ API 概览 - PFLobby.h](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
- [PFLobbyStateChangeType](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/enums/pflobbystatechangetype.md)
- [PFLobbyJoinLobbyCompletedStateChange](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyjoinlobbycompletedstatechange.md)
