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

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

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](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastopstate.md). 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](https://docs.xbox.com/build/console-features/game-dvr/gamedvr-broadcast.md)\
[XAppCapture Members](https://docs.xbox.com/reference/system/xappcapture/xappcapture_members.md)\
[XAppCaptureMetaDataStopState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastopstate.md)


## Related topics

- [XAppCaptureMetadataStopState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastopstate.md)
- [XAppCapture (API contents)](https://docs.xbox.com/reference/system/xappcapture/xappcapture_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XAppCaptureMetadataStartStringState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate.md)
- [XAppCaptureMetadataStartInt32State](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartint32state.md)
