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

# XAppBroadcastUnregisterIsAppBroadcastingChanged

> XAppBroadcastUnregisterIsAppBroadcastingChanged

# XAppBroadcastUnregisterIsAppBroadcastingChanged

移除一个应用广播状态更改事件处理程序。

## 语法

```cpp theme={null}
bool XAppBroadcastUnregisterIsAppBroadcastingChanged(  
         XTaskQueueRegistrationToken token,  
         bool wait  
)  
```

### 参数

*token*   \_In\_\
类型：XTaskQueueRegistrationToken

由 [XAppBroadcastRegisterIsAppBroadcastingChanged](/reference/system/xappcapture/functions/xappbroadcastregisterisappbroadcastingchanged) 创建的事件处理程序令牌。用于取消注册回调。

*wait*   \_In\_\
类型：bool

指示取消注册函数在回调函数正在运行某个阻塞函数时是否等待。此参数保证在此函数返回后不会再有回调发生，因此可以安全地关闭。

### 返回值

类型：bool

## 备注

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

每次调用 [XAppBroadcastRegisterIsAppBroadcastingChanged](/reference/system/xappcapture/functions/xappbroadcastregisterisappbroadcastingchanged) 后，当不再需要该事件处理程序时，都应调用 **AppBroadcastUnregisterIsAppBroadcastingChanged**。未调用此函数将会导致内存泄漏。此函数将取消注册由 [XAppBroadcastRegisterIsAppBroadcastingChanged](/reference/system/xappcapture/functions/xappbroadcastregisterisappbroadcastingchanged) 设置的 [XAppBroadcastMonitorCallback](/reference/system/xappcapture/functions/xappbroadcastmonitorcallback)。

## 要求

**头文件：** 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)\
[XAppBroadcastRegisterIsAppBroadcastingChanged](/reference/system/xappcapture/functions/xappbroadcastregisterisappbroadcastingchanged)\
[XAppBroadcastMonitorCallback](/reference/system/xappcapture/functions/xappbroadcastmonitorcallback)


## Related topics

- [XAppBroadcastRegisterIsAppBroadcastingChanged](/zh-CN/reference/system/xappcapture/functions/xappbroadcastregisterisappbroadcastingchanged.md)
- [XTaskQueueRegistrationToken](/zh-CN/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)
- [XAppCapture](/zh-CN/reference/system/xappcapture/xappcapture_members.md)
- [面向 GDK 的 Unity C# API 包装器](/zh-CN/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XAppBroadcastIsAppBroadcasting](/zh-CN/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting.md)
