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

# PartyTextToSpeechProfile::SetCustomContext

> 使用此配置文件配置可选的自定义指针大小上下文值。

使用此配置文件配置可选的自定义指针大小上下文值。

## Syntax

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

### Parameters

**`customContext`**   void\*\
*optional*

要与配置文件对象一起存储的任意指针大小值。

### Return value

PartyError

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

## Remarks

自定义上下文通常用作一种"快捷方式"，简化对与该配置文件关联的本地、游戏特定内存的访问，而无需进行映射查找。使用 [GetCustomContext()](/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/methods/partytexttospeechprofile_getcustomcontext) 方法检索该值。<br /><br /> 库将任何已配置的值视为不透明，且该值仅在本地设备上有效；它不会通过网络传输。

## Requirements

**Header:** Party.h

## See also

[PartyTextToSpeechProfile](/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/partytexttospeechprofile)\
[PartyTextToSpeechProfile::GetCustomContext](/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/methods/partytexttospeechprofile_getcustomcontext)


## Related topics

- [PartyTextToSpeechProfile::GetCustomContext](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/methods/partytexttospeechprofile_getcustomcontext.md)
- [PartyTextToSpeechProfile](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/partytexttospeechprofile.md)
- [PartyTextToSpeechProfile::GetIdentifier](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/methods/partytexttospeechprofile_getidentifier.md)
- [PartyTextToSpeechProfile::GetGender](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/methods/partytexttospeechprofile_getgender.md)
- [PartyTextToSpeechProfile::GetName](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/methods/partytexttospeechprofile_getname.md)
