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

# XAppBroadcastShowUI

> XAppBroadcastShowUI

# XAppBroadcastShowUI

向应用用户显示广播 UI，以便他们可以启动广播活动。

## 语法

```cpp theme={null}
HRESULT XAppBroadcastShowUI(  
         XUserHandle requestingUser  
)  
```

### 参数

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

要为其显示广播 UI 的用户。

### 返回值

类型：HRESULT

函数结果。

## 备注

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

此函数本身不会启动广播，而只是向用户显示他们需要浏览以开始广播的 UI。\
你可以通过广播状态更改事件的发生或通过 [XAppBroadcastIsAppBroadcasting](/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting) 检查广播状态来验证广播是否已启动。在调用此函数之前，你还应调用 [XAppBroadcastGetStatus](/reference/system/xappcapture/functions/xappbroadcastgetstatus) 来检查用户是否能够启动广播。

## 要求

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


## Related topics

- [XAppBroadcastIsAppBroadcasting](/zh-CN/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting.md)
- [XAppBroadcastGetStatus](/zh-CN/reference/system/xappcapture/functions/xappbroadcastgetstatus.md)
- [Game DVR 与广播](/zh-CN/build/console-features/game-dvr/gamedvr-broadcast.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)
