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

# chat_user::custom_user_context

> chat_user::custom_user_context

# chat\_user::custom\_user\_context

Retrieves the app's optional, private, custom pointer-sized context value previously associated with this user.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
void* custom_user_context(  
)  
```

<a id="parametersSection" />

### Parameters

None.

<a id="retvalSection" />

### Return value

Type: void\*

The pointer-sized value previously associated with this user; otherwise, a null pointer.

<a id="remarksSection" />

## Remarks

This method retrieves the app's private, custom pointer-sized context value previously associated with this [chat\_user](/reference/chat/gamechat2/classes/chat_user/chat_user) object. If no custom user context has been set yet for this `chat_user` object, this method returns a null pointer.

The custom user context is typically used as a "shortcut" that simplifies accessing local, app-specific memory associated with the user without requiring a mapping lookup. Use the [chat\_user::set\_custom\_user\_context](/reference/chat/gamechat2/classes/chat_user/methods/chat_user_set_custom_user_context) method to set the custom user context for a `chat_user` object.

<a id="requirementsSection" />

## Requirements

**Header:** GameChat2.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

[Intro to Game Chat 2](/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)\
[chat\_user](/reference/chat/gamechat2/classes/chat_user/chat_user)


## Related topics

- [chat_user::set_custom_user_context](/reference/chat/gamechat2/classes/chat_user/methods/chat_user_set_custom_user_context.md)
- [chat_user::xbox_user_id](/reference/chat/gamechat2/classes/chat_user/methods/chat_user_xbox_user_id.md)
- [chat_user::chat_indicator](/reference/chat/gamechat2/classes/chat_user/methods/chat_user_chat_indicator.md)
- [chat_user::local](/reference/chat/gamechat2/classes/chat_user/methods/chat_user_local_function_2.md)
- [chat_user_local::remote_user_muted](/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_remote_user_muted.md)
