> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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)。

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

## 要求

**头文件：** 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 概览](https://docs.xbox.com/zh-CN/build/console-features/game-dvr/gamedvr-broadcast.md)\
[XAppCapture 成员](https://docs.xbox.com/zh-CN/reference/system/xappcapture/xappcapture_members.md)\
[XAppBroadcastIsAppBroadcasting](https://docs.xbox.com/zh-CN/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting.md)\
[XAppBroadcastGetStatus](https://docs.xbox.com/zh-CN/reference/system/xappcapture/functions/xappbroadcastgetstatus.md)


## Related topics

- [XAppBroadcastIsAppBroadcasting](https://docs.xbox.com/zh-CN/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting.md)
- [XAppBroadcastGetStatus](https://docs.xbox.com/zh-CN/reference/system/xappcapture/functions/xappbroadcastgetstatus.md)
- [Game DVR 与广播](https://docs.xbox.com/zh-CN/build/console-features/game-dvr/gamedvr-broadcast.md)
- [XAppCapture（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xappcapture/xappcapture_members.md)
- [在 Unity 项目中使用 GDK API 的 C# 包装器](https://docs.xbox.com/zh-CN/build/gdk-and-engines/unity/unity-api-wrappers.md)
