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

# XUserPlatformRemoteConnectShowPromptEventHandler

> XUserPlatformRemoteConnectShowPromptEventHandler

# XUserPlatformRemoteConnectShowPromptEventHandler

远程连接身份验证的显示提示事件处理程序。

## 语法

```cpp theme={null}
typedef void (XUserPlatformRemoteConnectShowPromptEventHandler)(
    _In_opt_ void* context,
    _In_ uint32_t userIdentifier,
    _In_ XUserPlatformOperation operation,
    _In_z_ char const* url,
    _In_z_ char const* code,
    _In_ size_t qrCodeSize,
    _In_reads_bytes_(qrCodeSize) void const* qrCode
);
```

### 参数

*context*    \_In\_opt\_\
类型：void\*

指向事件处理程序所使用数据的可选指针。

*userIdentifier*    \_In\_\
类型：uint32\_t

在添加用户时传递给 XUser 的用户标识符。

*operation*   \_In\_\
类型：XUserPlatformOperation

此操作的句柄。

*url*    \_In\_z\_\
类型：char const\*

要在提示中显示的 URL。

*code*    \_In\_z\_\
类型：char const\*

要在提示中显示的代码。

*qrCodeSize*    \_In\_\
类型：size\_t

qrCode 缓冲区的大小。

*qrCode*    \_In\_reads\_bytes\_\
类型：void const\*

指向缓冲区的指针，该缓冲区以 PNG 格式包含 URL 的二维码。

### 返回值

## 注解

当 XUser 需要提示用户执行远程连接身份验证过程时，会引发此事件。

提示 UI 应保持显示，直到调用 XUserPlatformRemoteConnectClosePromptEventHandler 或被用户关闭。

以防用户无法扫描二维码，游戏仍应呈现返回的 URL 和代码。二维码中也不会嵌入该代码。

所有参数均由调用方拥有（context 除外）。

## 要求

**头文件：** XUser.h

**库：** xgameruntime.lib

**支持的平台：** 在 Steam Deck 上受支持

## 另请参阅

[`XUserPlatformRemoteConnectEventHandlers`](/reference/system/xuser/structs/xuserplatformremoteconnecteventhandlers)

[`XUserPlatformRemoteConnectSetEventHandlers`](/reference/system/xuser/functions/xuserplatformremoteconnectseteventhandlers)

[`XUserPlatformRemoteConnectClosePromptEventHandler`](/reference/system/xuser/functions/xuserplatformremoteconnectcloseprompteventhandler)

[`XUserPlatformRemoteConnectCancelPrompt`](/reference/system/xuser/functions/xuserplatformremoteconnectcancelprompt)


## Related topics

- [XUserPlatformRemoteConnectClosePromptEventHandler](/zh-CN/reference/system/xuser/functions/xuserplatformremoteconnectcloseprompteventhandler.md)
- [XUserPlatformRemoteConnectEventHandlers](/zh-CN/reference/system/xuser/structs/xuserplatformremoteconnecteventhandlers.md)
- [XUserPlatformRemoteConnectCancelPrompt](/zh-CN/reference/system/xuser/functions/xuserplatformremoteconnectcancelprompt.md)
- [XUserPlatformRemoteConnectSetEventHandlers](/zh-CN/reference/system/xuser/functions/xuserplatformremoteconnectseteventhandlers.md)
- [XUserPlatformOperationResult](/zh-CN/reference/system/xuser/enums/XUserPlatformOperationResult.md)
