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

# PartyLocalUser::GetCustomContext

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

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

## Syntax

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

### Parameters

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

输出的自定义上下文。

### Return value

PartyError

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

## Remarks

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

## Requirements

**Header:** Party.h

## See also

[PartyLocalUser](/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/partylocaluser)\
[PartyLocalUser::SetCustomContext](/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_setcustomcontext)


## Related topics

- [PartyLocalUser::SetCustomContext](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_setcustomcontext.md)
- [PartyXblChatUser::GetCustomContext](/zh-CN/services/playfab/multiplayer/networking/xblreference/classes/PartyXblChatUser/methods/partyxblchatuser_getcustomcontext.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)
- [PartyDevice::GetCustomContext](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyDevice/methods/partydevice_getcustomcontext.md)
