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

# start_processing_state_changes

> chat_manager::start_processing_state_changes

Retrieves an array of all Game Chat state changes to process since the last such call.

## Syntax

```cpp theme={null}
void start_processing_state_changes(  
    uint32_t* stateChangeCount,  
    game_chat_state_change_array* stateChanges  
)  
```

### Parameters

*stateChangeCount*   \_Out\_\
Type: uint32\_t\*

A place to write the number of game\_chat\_state\_change entries for the app to handle in the *stateChanges* array.

*stateChanges*   \_Outptr\_result\_buffer\_(\*stateChangeCount)\
Type: game\_chat\_state\_change\_array\*

A place to store a pointer to the array of all game\_chat\_state\_change entries for the app to handle and then pass to chat\_manager::finish\_processing\_state\_changes().

### Return value

Type: void

## Remarks

This method provides a list of all changes currently available for the app since the last call to this method. The app should use the provided array of 0 or more changes to update its own state or UI, and then call chat\_manager::finish\_processing\_state\_changes() with them in a timely manner.

If you call chat\_manager::start\_processing\_state\_changes() again without having called chat\_manager::finish\_processing\_state\_changes() on the list of state change objects returned by a previous call, this method will throw an exception. You must always call chat\_manager::finish\_processing\_state\_changes() with the values returned by chat\_manager::start\_processing\_state\_changes(), even if it returns 0 state change entries.

Once chat\_manager::start\_processing\_state\_changes() has been called, chat\_manager::remove\_user() must not be called until after the corresponding call to chat\_manager::finish\_processing\_state\_changes(). Calling chat\_manager::remove\_user() while state changes are being processed will invalidate the memory associated with the removed user, even if a pointer to the memory associated with that user was returned in a state change.

## Requirements

**Header:** GameChat2.h

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

## See also

[chat\_manager](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_manager/chat_manager.md)\
[game\_chat\_state\_change](https://docs.xbox.com/reference/chat/gamechat2/structs/game_chat_state_change.md)\
[game\_chat\_state\_change\_array](https://docs.xbox.com/reference/chat/gamechat2/structs/game_chat_state_change.md)\
[chat\_manager::finish\_processing\_state\_changes](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_finish_processing_state_changes.md)\
[chat\_manager::remove\_user](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_remove_user.md)


## Related topics

- [finish_processing_state_changes](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_finish_processing_state_changes.md)
- [game_chat_state_change](https://docs.xbox.com/reference/chat/gamechat2/structs/game_chat_state_change.md)
- [game_chat_state_change_type](https://docs.xbox.com/reference/chat/gamechat2/enums/game_chat_state_change_type.md)
- [Using the Game Chat 2 C++ API](https://docs.xbox.com/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2.md)
- [remove_user](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_remove_user.md)
