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

# XAppCaptureMetadataStopState

> XAppCaptureMetadataStopState

Add a state stop for a particular named state to the app capture metadata.

## Syntax

```cpp theme={null}
HRESULT XAppCaptureMetadataStopState(  
         const char* name  
)  
```

### Parameters

*name*   \_In\_z\_\
Type: char\*

Name of the state to be stopped.

### 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. Events are started by one of the XappCaptureMetaDataStart\*Event functions: [XAppCaptureMetadataStartInt32State](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartint32state.md), [XAppCaptureMetadataStartDoubleState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartdoublestate.md), or [XAppCaptureMetadataStartStringState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate.md). Stop state will only stop one state at a time, If you wish to stop all metadata states at once call [XAppCaptureMetadataStopAllStates](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastopallstates.md).

## 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)\
[XAppCaptureMetadataStopAllStates](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastopallstates.md)\
[XAppCaptureMetadataStartInt32State](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartint32state.md)\
[XAppCaptureMetadataStartDoubleState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartdoublestate.md)\
[XAppCaptureMetadataStopAllStates](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastopallstates.md)


## Related topics

- [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)
- [XAppCaptureMetadataStopAllStates](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastopallstates.md)
- [XAppCaptureMetadataStartStringState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate.md)
- [XAppCaptureMetadataStartInt32State](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartint32state.md)
