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

# XAppCaptureMetadataStopState

> 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).</Note>

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](/reference/system/xappcapture/functions/xappcapturemetadatastartint32state), [XAppCaptureMetadataStartDoubleState](/reference/system/xappcapture/functions/xappcapturemetadatastartdoublestate), or [XAppCaptureMetadataStartStringState](/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate). Stop state will only stop one state at a time, If you wish to stop all metadata states at once call [XAppCaptureMetadataStopAllStates](/reference/system/xappcapture/functions/xappcapturemetadatastopallstates).

## 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)\
[XAppCaptureMetadataStopAllStates](/reference/system/xappcapture/functions/xappcapturemetadatastopallstates)\
[XAppCaptureMetadataStartInt32State](/reference/system/xappcapture/functions/xappcapturemetadatastartint32state)\
[XAppCaptureMetadataStartDoubleState](/reference/system/xappcapture/functions/xappcapturemetadatastartdoublestate)\
[XAppCaptureMetadataStopAllStates](/reference/system/xappcapture/functions/xappcapturemetadatastopallstates)


## Related topics

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