> ## 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.

# PFLobbyGetCustomContext

> PFLobbyGetCustomContext 参考，用于在 PlayFab Multiplayer C++ SDK 中读取先前附加到大厅句柄的应用定义指针上下文。

检索先前与此大厅对象关联的应用私有自定义指针大小的上下文值。

## 语法

```cpp theme={null}
HRESULT PFLobbyGetCustomContext(  
    PFLobbyHandle lobby,  
    void** customContext  
)  
```

### 参数

**`lobby`**   PFLobbyHandle

大厅的句柄。

**`customContext`**   void\*\*\
*output, may return nullptr*

输出的自定义上下文。

### 返回值

类型：HRESULT

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

## 备注

如果尚未设置自定义上下文，则 `customContext` 指向的值将设置为 nullptr。

## 要求

**头文件：** PFLobby.h

## 另请参阅

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


## Related topics

- [PFLobbySetCustomContext](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbysetcustomcontext.md)
- [PFMultiplayer C/C++ API 概览 - PFLobby.h](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
- [PFMatchmakingTicketGetCustomContext](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetcustomcontext.md)
- [PartyInvitation::GetCustomContext](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyInvitation/methods/partyinvitation_getcustomcontext.md)
- [PartyNetwork::GetCustomContext](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getcustomcontext.md)
