> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PartyDevice::GetChatControls

> Gets the chat controls on this device.

Gets the chat controls on this device.

## Syntax

```cpp theme={null}
PartyError GetChatControls(  
    uint32_t* chatControlCount,  
    PartyChatControlArray* chatControls  
)  
```

### Parameters

**`chatControlCount`**   uint32\_t\*\
*output*

The output number of chat controls on this device.

**`chatControls`**   [PartyChatControlArray\*](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/typedefs.md)\
*library-allocated output array of size `*chatControlCount`*

A library-allocated output array containing the chat controls on this device.

### Return value

PartyError

`c_partyErrorSuccess` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PartyManager::GetErrorMessage()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage.md).

## Remarks

Once a [PartyChatControlDestroyedStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partychatcontroldestroyedstatechange.md) has been provided by [PartyManager::StartProcessingStateChanges()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges.md), the chat control will no longer be present in the array returned by this method. \
\
&#x20;The memory for the returned array is invalidated whenever the title calls PartyManager::StartProcessingStateChanges(). If this is the local device, the memory for the array is also invalidated when [PartyLocalDevice::CreateChatControl()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol.md) returns success.

## Requirements

**Header:** Party.h

## See also

[PartyDevice](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyDevice/partydevice.md)\
[PartyLocalDevice::CreateChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol.md)\
[PartyLocalDevice::DestroyChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_destroychatcontrol.md)\
[PartyChatControlDestroyedStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partychatcontroldestroyedstatechange.md)


## Related topics

- [PartyLocalDevice::CreateChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol.md)
- [PartyManager::GetChatControls](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_getchatcontrols.md)
- [PartyChatControl::GetDevice](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getdevice.md)
- [PartyNetwork::GetChatControls](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getchatcontrols.md)
- [PartyDevice::GetLocal](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyDevice/methods/partydevice_getlocal.md)
