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

# XNetworkingQuerySecurityInformationForUrlAsyncResultSize

> XNetworkingQuerySecurityInformationForUrlAsyncResultSize

# XNetworkingQuerySecurityInformationForUrlAsyncResultSize

获取来自 [XNetworkingQuerySecurityInformationForUrlAsync](/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync) 调用的结果缓冲区大小。

## 语法

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

### 参数

*asyncBlock*   \_Inout\_\
类型：[XAsyncBlock](/reference/system/xasync/structs/xasyncblock)\*

指向传递给 [XNetworkingQuerySecurityInformationForUrlAsync](/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync) 函数的 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 结构体的指针。

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

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

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

此函数获取来自 `XNetworkingQuerySecurityInformationForUrlAsync` 调用的结果缓冲区大小。游戏应传递与传给查询函数的相同 `XAsyncBlock` 结构体。该缓冲区是安全信息结构指针中所有指针使用的底层缓冲区。只要仍在使用安全信息结构指针，游戏就应保持该缓冲区的有效性。释放并清理该缓冲区也会清理安全信息结构指针使用的所有内存。有关 Microsoft 游戏开发工具包 (GDK) 游戏中的网络信息，请参阅[检索网络信息](/build/console-features/networking/initialization-connectivity-networking)。

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

## 要求

**头文件：** XNetworking.h

**库：** xgameruntime.lib

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

## 另请参阅

[HTTP 和 Web 套接字](/build/console-features/networking/web-requests/http-networking)\
[XNetworking](/reference/networking/xnetworking/xnetworking_members)


## Related topics

- [XNetworkingQuerySecurityInformationForUrlAsyncResult](/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresult.md)
- [XNetworking](/zh-CN/reference/networking/xnetworking/xnetworking_members.md)
- [面向 GDK 的 Unity C# API 包装器](/zh-CN/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize](/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresultsize.md)
- [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult](/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresult.md)
