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

# XAppBroadcastGetStatus

> XAppBroadcastGetStatus

# XAppBroadcastGetStatus

检索当前设备与当前应用的广播状态。

## 语法

```cpp theme={null}
HRESULT XAppBroadcastGetStatus(  
         XUserHandle requestingUser,  
         XAppBroadcastStatus* appBroadcastStatus  
)  
```

### 参数

*requestingUser*   \_In\_\
类型：XUserHandle

请求广播状态的用户句柄。

*appBroadcastStatus*   \_Out\_\
类型：[XAppBroadcastStatus\*](/reference/system/xappcapture/structs/xappbroadcaststatus)

*requestingUser* 的广播状态。

### 返回值

类型：HRESULT

函数结果。

## 备注

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

使用此函数可确定是否可以为你的游戏开始广播。检索广播状态还可能揭示无法广播的原因（如果确实无法广播的话）。建议在调用 [XAppBroadcastShowUI](/reference/system/xappcapture/functions/xappbroadcastshowui) 方法之前调用此函数。
如果想查看游戏当前是否正在广播，请调用 [XAppBroadcastIsAppBroadcasting](/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting)。

## 要求

**头文件：** 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)\
[XAppBroadcastShowUI](/reference/system/xappcapture/functions/xappbroadcastshowui)\
[XAppBroadcastIsAppBroadcasting](/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting)


## Related topics

- [XAppBroadcastStatus](/zh-CN/reference/system/xappcapture/structs/xappbroadcaststatus.md)
- [XAppBroadcastIsAppBroadcasting](/zh-CN/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting.md)
- [XAppBroadcastShowUI](/zh-CN/reference/system/xappcapture/functions/xappbroadcastshowui.md)
- [Game DVR 与广播](/zh-CN/build/console-features/game-dvr/gamedvr-broadcast.md)
- [XAppCapture](/zh-CN/reference/system/xappcapture/xappcapture_members.md)
