> ## 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::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\*](/services/playfab/multiplayer/networking/reference/typedefs)\
*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()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

## Remarks

Once a [PartyChatControlDestroyedStateChange](/services/playfab/multiplayer/networking/reference/structs/partychatcontroldestroyedstatechange) has been provided by [PartyManager::StartProcessingStateChanges()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges), the chat control will no longer be present in the array returned by this method. <br /><br /> 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()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol) returns success.

## Requirements

**Header:** Party.h

## See also

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


## Related topics

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