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

# PFLobbyGetServerProperty

> PFLobbyGetServerProperty 参考，用于通过 PlayFab Multiplayer C++ SDK API 按键读取 PlayFab 大厅上服务器范围的自定义属性值。

根据键获取大厅服务器属性的值。

## 语法

```cpp theme={null}
HRESULT PFLobbyGetServerProperty(  
    PFLobbyHandle lobby,  
    const char* key,  
    const char** value  
)  
```

### 参数

**`lobby`**   PFLobbyHandle

大厅的句柄。

**`key`**   char\*\
*is null-terminated*

属性的键。

**`value`**   char\*\*\
*library-allocated output, may return nullptr*

与键关联的输出值。输出为 null 值表示该属性不存在。

### 返回值

类型：HRESULT

如果调用成功，则为 `S_OK`；否则为错误代码。可通过 [PFMultiplayerGetErrorMessage()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage) 检索错误代码的可读形式。

## 备注

如果此大厅不是客户端拥有的大厅，则不会返回任何属性值。

## 要求

**头文件：** PFLobby.h

## 另请参阅

[PFLobby 成员](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)
