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

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

## Remarks

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

## Requirements

**Header:** Party.h

## See also

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


## Related topics

- [PartyNetwork::ConnectChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_connectchatcontrol.md)
- [PartyChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol.md)
- [PartyChatControl::GetLocal](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getlocal.md)
- [PartyChatControl::GetDevice](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getdevice.md)
- [PartyChatControl::GetEntityId](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getentityid.md)
