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

# XAppCaptureMetadataStopAllStates

> XAppCaptureMetadataStopAllStates

# XAppCaptureMetadataStopAllStates

Stops all state events currently active.

## Syntax

```cpp theme={null}
HRESULT XAppCaptureMetadataStopAllStates(  
)  
```

### Parameters

### Return value

Type: HRESULT

Function result.

## Remarks

<Note>This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

Adding a stop state to the app capture timeline will mark the end of a previously started event. To mark the end of a single state event call [XAppCaptureMetaDataStopState](/reference/system/xappcapture/functions/xappcapturemetadatastopstate). Stopping all states is useful for instances like the end of the match where all previous states are assumed to conclude due to the match ending.

## Requirements

**Header:** XAppCapture.h

**Library:** xgameruntime.lib

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

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[GameDVR Overview](/build/console-features/game-dvr/gamedvr-broadcast)\
[XAppCapture Members](/reference/system/xappcapture/xappcapture_members)\
[XAppCaptureMetaDataStopState](/reference/system/xappcapture/functions/xappcapturemetadatastopstate)


## Related topics

- [XAppCaptureMetadataStopState](/reference/system/xappcapture/functions/xappcapturemetadatastopstate.md)
- [XAppCapture](/reference/system/xappcapture/xappcapture_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [AppCaptureMetadataStartStringState](/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate.md)
- [XAppCaptureMetadataStartInt32State](/reference/system/xappcapture/functions/xappcapturemetadatastartint32state.md)
