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

# XNetworkingQuerySecurityInformationForUrlAsyncResult

> XNetworkingQuerySecurityInformationForUrlAsyncResult

# XNetworkingQuerySecurityInformationForUrlAsyncResult

取得 [XNetworkingQuerySecurityInformationForUrlAsync](/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync) 函式的結果。

## 語法

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

### 參數

*asyncBlock*   \_Inout\_\
類型：[XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock)\*

傳遞給 [XNetworkingQuerySecurityInformationForUrlAsync](/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync) 函式之 [XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock) 的指標。

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

要為結果緩衝區配置的大小 (以位元組為單位)。此資料可藉由呼叫 [XNetworkingQuerySecurityInformationForUrlAsyncResultSize](/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresultsize) 取得。或者，如果您已預先配置大型結果緩衝區，可以傳入預先配置之緩衝區的大小。

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

實際結果緩衝區大小 (以位元組為單位) 的指標。

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

包含指紋結果之緩衝區的指標。

*securityInformation*   \_Outptr\_\
類型：[XNetworkingSecurityInformation](/zh-TW/reference/networking/xnetworking/structs/xnetworkingsecurityinformation)\*\*

從網路安全性允許清單 (NSAL) 傳回之憑證指紋清單的指標。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

此函式會取得 [XNetworkingQuerySecurityInformationForUrlAsync](/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync) 函式的結果。其指標會決定配置給結果緩衝區的位元組大小、緩衝區位元組大小的實際結果、包含指紋結果的緩衝區，以及從 NSAL 傳回的憑證指紋清單。

此緩衝區是安全性資訊結構指標中所有指標所使用的基礎緩衝區。只要遊戲仍在使用安全性資訊結構指標，就應讓緩衝區保持有效。釋放並清除緩衝區也會清除安全性資訊結構指標所使用的所有記憶體。如需 Microsoft Game Development Kit (GDK) 遊戲中的網路資訊，請參閱[擷取網路資訊](/zh-TW/build/console-features/networking/initialization-connectivity-networking)。

此方法會查詢呼叫處理程序內的本機狀態並快速傳回，因此可以安全地從時間敏感的內容中呼叫。

## 需求

**標頭：** XNetworking.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[HTTP 和 WebSocket](/zh-TW/build/console-features/networking/web-requests/http-networking)\
[XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult](/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresult)\
[XNetworking](/zh-TW/reference/networking/xnetworking/xnetworking_members)


## Related topics

- [XNetworkingQuerySecurityInformationForUrlAsyncResult](/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresult.md)
- [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult](/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresult.md)
