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

# XNetworkingQuerySecurityInformationForUrlAsync

> XNetworkingQuerySecurityInformationForUrlAsync

# XNetworkingQuerySecurityInformationForUrlAsync

检索与在通用开发者门户中为启用 XBOX Live 的游戏配置的 URL 关联的其他安全信息。

## 语法

```cpp theme={null}
HRESULT XNetworkingQuerySecurityInformationForUrlAsync(
         const char* url,
         XAsyncBlock* asyncBlock
)
```

### 参数

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

安全信息和证书指纹列表的 URL。

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

指向传递给 [XAsyncRun](/reference/system/xasync/functions/xasyncrun) 函数的 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 结构的指针。

### 返回值

类型：HRESULT

异步调用的 HRESULT 成功或错误代码。

## 备注

此函数启动一个异步请求，以获取与通过通用开发者门户为游戏配置的 URL 关联的安全信息。这允许启用 XBOX Live 的 Microsoft 游戏开发工具包 (GDK) 游戏在与 [Windows HTTP 服务 (WinHTTP)](https://learn.microsoft.com/windows/desktop/winhttp/winhttp-start-page) API 配对时，为自定义的游戏特定服务终结点执行证书固定。在向 XBOX Live 服务终结点发出任何自定义 Web 请求时，也需要此函数。XBOX 服务 API (XSAPI) 库会自动处理此要求。

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

## 要求

**头文件：** XNetworking.h

**库：** xgameruntime.lib

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

## 另请参阅

[检索网络信息](/build/console-features/networking/initialization-connectivity-networking)\
[HTTP 和 WebSockets](/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)
- [XNetworkingQuerySecurityInformationForUrlAsyncResultSize](/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresultsize.md)
- [XNetworkingSecurityInformation](/zh-CN/reference/networking/xnetworking/structs/xnetworkingsecurityinformation.md)
- [XNetworking](/zh-CN/reference/networking/xnetworking/xnetworking_members.md)
- [XNetworkingThumbprint](/zh-CN/reference/networking/xnetworking/structs/xnetworkingthumbprint.md)
