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

向应用捕获元数据中为特定命名的状态添加一个状态停止。

## 语法

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

### 参数

*name*   \_In\_z\_\
类型：char\*

要停止的状态的名称。

### 返回值

类型：HRESULT

函数结果。

## 备注

<Note>此函数不能在时间敏感线程上安全调用。有关详细信息，请参阅 [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)。</Note>

向应用捕获时间线添加一个停止状态将标记先前启动的事件的结束。事件由 XappCaptureMetaDataStart\*Event 函数之一启动：[XAppCaptureMetadataStartInt32State](/reference/system/xappcapture/functions/xappcapturemetadatastartint32state)、[XAppCaptureMetadataStartDoubleState](/reference/system/xappcapture/functions/xappcapturemetadatastartdoublestate) 或 [XAppCaptureMetadataStartStringState](/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate)。停止状态一次只会停止一个状态，如果你希望一次停止所有元数据状态，请调用 [XAppCaptureMetadataStopAllStates](/reference/system/xappcapture/functions/xappcapturemetadatastopallstates)。

## 要求

**头文件：** XAppCapture.h

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 概念性文档

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

## 另请参阅

[GameDVR 概览](/build/console-features/game-dvr/gamedvr-broadcast)\
[XAppCapture 成员](/reference/system/xappcapture/xappcapture_members)\
[XAppCaptureMetadataStartInt32State](/reference/system/xappcapture/functions/xappcapturemetadatastartint32state)\
[XAppCaptureMetadataStartDoubleState](/reference/system/xappcapture/functions/xappcapturemetadatastartdoublestate)\
[XAppCaptureMetadataStopAllStates](/reference/system/xappcapture/functions/xappcapturemetadatastopallstates)


## Related topics

- [XAppCapture](/zh-CN/reference/system/xappcapture/xappcapture_members.md)
- [面向 GDK 的 Unity C# API 包装器](/zh-CN/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XAppCaptureMetadataStopAllStates](/zh-CN/reference/system/xappcapture/functions/xappcapturemetadatastopallstates.md)
- [AppCaptureMetadataStartStringState](/zh-CN/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate.md)
- [XAppCaptureMetadataStartInt32State](/zh-CN/reference/system/xappcapture/functions/xappcapturemetadatastartint32state.md)
