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

# PartyChatControl::GetNetworks

> Gets the networks to which this chat control is connected.

Gets the networks to which this chat control is connected.

## Syntax

```cpp theme={null}
PartyError GetNetworks(  
    uint32_t* networkCount,  
    PartyNetworkArray* networks  
)  
```

### Parameters

**`networkCount`**   uint32\_t\*\
*output*

The output number of networks to which this chat control is connected.

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

A library-allocated output array containing the networks to which this chat control is connected.

### 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 [PartyChatControlLeftNetworkStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partychatcontrolleftnetworkstatechange.md) has been provided by [PartyManager::StartProcessingStateChanges()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges.md), the network 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() or [PartyNetwork::ConnectChatControl()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_connectchatcontrol.md) returns success.

## Requirements

**Header:** Party.h

## See also

[PartyChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol.md)\
[PartyNetwork::ConnectChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_connectchatcontrol.md)\
[PartyNetwork::DisconnectChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_disconnectchatcontrol.md)\
[PartyChatControlLeftNetworkStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partychatcontrolleftnetworkstatechange.md)


## Related topics

- [PartyNetwork::ConnectChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_connectchatcontrol.md)
- [PartyChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol.md)
- [PartyChatControlLeftNetworkStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partychatcontrolleftnetworkstatechange.md)
- [PartyChatControlJoinedNetworkStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partychatcontroljoinednetworkstatechange.md)
- [PartyChatControl::SetCustomContext](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_setcustomcontext.md)
