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

# PartyDevice::GetCustomContext

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

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

## 语法

```cpp theme={null}
PartyError GetCustomContext(  
    void** customContext  
)  
```

### 参数

**`customContext`**   void\*\*
*输出,可能返回 nullptr*

输出的自定义上下文。

### 返回值

PartyError

如果检索自定义上下文成功,则返回 `c_partyErrorSuccess`;否则返回错误代码。可以通过 [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage) 检索错误代码的人类可读形式。

## 备注

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

## 要求

\*\*头文件:\*\*Party.h

## 另请参阅

[PartyDevice](/services/playfab/multiplayer/networking/reference/classes/PartyDevice/partydevice)
[PartyDevice::SetCustomContext](/services/playfab/multiplayer/networking/reference/classes/PartyDevice/methods/partydevice_setcustomcontext)


## Related topics

- [PartyDevice::SetCustomContext](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyDevice/methods/partydevice_setcustomcontext.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)
- [PartyEndpoint::GetCustomContext](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getcustomcontext.md)
- [PartyLocalUser::GetCustomContext](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_getcustomcontext.md)
