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

# XNetworkingQuerySecurityInformationForUrlAsyncResultSize

> XNetworkingQuerySecurityInformationForUrlAsyncResultSize

# XNetworkingQuerySecurityInformationForUrlAsyncResultSize

取得 [XNetworkingQuerySecurityInformationForUrlAsync](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync.md) 呼叫的結果緩衝區大小。

## 語法

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

### 參數

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

傳遞給 [XNetworkingQuerySecurityInformationForUrlAsync](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync.md) 函式之 [XAsyncBlock](https://docs.xbox.com/zh-TW/reference/system/xasync/structs/xasyncblock.md) 結構的指標。

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

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

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

此函式會取得 `XNetworkingQuerySecurityInformationForUrlAsync` 呼叫的結果緩衝區大小。遊戲應傳遞與傳遞給查詢函式相同的 `XAsyncBlock` 結構。此緩衝區是安全性資訊結構指標中所有指標所使用的基礎緩衝區。只要遊戲仍在使用安全性資訊結構指標，就應讓緩衝區保持有效。釋放並清除緩衝區也會清除安全性資訊結構指標所使用的所有記憶體。如需 Microsoft Game Development Kit (GDK) 遊戲中的網路資訊，請參閱[擷取網路資訊](https://docs.xbox.com/zh-TW/build/console-features/networking/initialization-connectivity-networking.md)。

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

## 需求

**標頭：** XNetworking.h

**程式庫：** xgameruntime.lib

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

## 另請參閱

[HTTP 和 WebSocket](https://docs.xbox.com/zh-TW/build/console-features/networking/web-requests/http-networking.md)\
[XNetworking](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/xnetworking_members.md)


## Related topics

- [XNetworkingQuerySecurityInformationForUrlAsyncResult](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresult.md)
- [XNetworking (API 內容)](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/xnetworking_members.md)
- [在 Unity 專案中使用 GDK API 的 C# 包裝函式](https://docs.xbox.com/zh-TW/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresultsize.md)
- [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresult.md)
