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

# XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize

> XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize

# XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize

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

## 语法

```cpp theme={null}
HRESULT XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize(
         XAsyncBlock* asyncBlock,
         size_t* securityInformationBufferByteCount
)
```

### 参数

*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*   \_Out\_\
类型：size\_t\*

结果缓冲区的大小（以字节为单位）。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

此函数通过调用 `XNetworkingQuerySecurityInformationForUrlUtf16Async` 函数获取缓冲区结果。结果缓冲区的字节数由 *securityInformationBufferByteCount* 指针确定。有关 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)\
[XNetworking](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/xnetworking_members.md)


## Related topics

- [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresult.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)
- [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)
