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

# XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult

> XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult

# XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult

获取 [XNetworkingQuerySecurityInformationForUrlUtf16Async](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16async.md) 函数的缓冲区结果。

## 语法

```cpp theme={null}
HRESULT XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult(
         XAsyncBlock* asyncBlock,
         size_t securityInformationBufferByteCount,
         size_t* securityInformationBufferByteCountUsed,
         uint8_t* securityInformationBuffer,
         XNetworkingSecurityInformation** securityInformation
)
```

### 参数

*asyncBlock*   \_Inout\_\
类型：[XAsyncBlock](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md)\*

指向传递给[XNetworkingQuerySecurityInformationForUrlUtf16Async](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16async.md) 函数的 [XAsyncBlock](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md) 结构体的指针。

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

为结果缓冲区分配的大小（以字节为单位）。此数据通过调用[XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresultsize.md) 函数获取。或者，如果你已预分配一个大的结果缓冲区，则可以传入预分配缓冲区的大小。

*securityInformationBufferByteCountUsed*   \_Out\_opt\_\
类型：size\_t\*

指向实际结果缓冲区大小（以字节为单位）的指针。

*securityInformationBuffer*   \_Out\_writes\_bytes\_to\_(securityInformationBufferByteCount,\*securityInformationBufferByteCountUsed)\
类型：uint8\_t\*

指向包含指纹结果的缓冲区的指针。

*securityInformation*   \_Outptr\_\
类型：[XNetworkingSecurityInformation](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/structs/xnetworkingsecurityinformation.md)\*\*

指向从网络安全允许列表 (NSAL) 返回的证书指纹列表的指针。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

此函数通过调用 `XNetworkingQuerySecurityInformationForUrlUtf16Async` 函数获取缓冲区结果。为结果缓冲区分配的字节数由 *securityInformationBufferByteCount* 指针确定。结果缓冲区的实际字节数由 *securityInformationBufferByteCountUsed* 指针确定。指纹结果以及从 NSAL 返回的证书指纹列表由 *securityInformationBuffer* 指针和 *securityInformation* 指针确定。有关 Microsoft 游戏开发工具包 (GDK) 游戏中的网络信息，请参阅[检索网络信息](https://docs.xbox.com/zh-CN/build/console-features/networking/initialization-connectivity-networking.md)。

此方法查询调用进程中的本地状态并快速返回，因此可以从时间敏感的上下文中安全调用。

## 要求

**头文件：** XNetworking.h

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[HTTP 和 Web 套接字](https://docs.xbox.com/zh-CN/build/console-features/networking/web-requests/http-networking.md)\
[XNetworkingQuerySecurityInformationForUrlAsyncResult](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresult.md)\
[XNetworking](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/xnetworking_members.md)


## Related topics

- [XNetworkingQuerySecurityInformationForUrlUtf16Async](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16async.md)
- [XNetworkingQuerySecurityInformationForUrlAsyncResult](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresult.md)
- [XNetworking（API 内容）](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/xnetworking_members.md)
- [在 Unity 项目中使用 GDK API 的 C# 包装器](https://docs.xbox.com/zh-CN/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresultsize.md)
