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

# HCHttpCallResponseSetNetworkErrorCode

> HCHttpCallResponseSetNetworkErrorCode

# HCHttpCallResponseSetNetworkErrorCode

設定 HTTP 呼叫的網路錯誤碼。

## 語法

```cpp theme={null}
HRESULT HCHttpCallResponseSetNetworkErrorCode(  
         HCCallHandle call,  
         HRESULT networkErrorCode,  
         uint32_t platformNetworkErrorCode  
)  
```

### 參數

*call*   \_In\_\
類型：HCCallHandle

HTTP 呼叫的控制代碼。

*networkErrorCode*   \_In\_\
類型：HRESULT

HTTP 呼叫的網路錯誤碼。

*platformNetworkErrorCode*   \_In\_\
類型：uint32\_t

HTTP 呼叫的平台特定網路錯誤碼，用於記錄 / 偵錯。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。可能的值為 S\_OK、E\_INVALIDARG 或 E\_FAIL。

## 需求

**標頭：** httpProvider.h

**程式庫：** libHttpClient.GDK.lib

## 另請參閱

[httpProvider](/zh-TW/reference/live/httpclient/httpprovider/httpprovider_members)


## Related topics

- [HCMockResponseSetNetworkErrorCode](/zh-TW/reference/live/httpclient/mock/functions/hcmockresponsesetnetworkerrorcode.md)
- [HCHttpCallResponseGetNetworkErrorCode](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetnetworkerrorcode.md)
- [HCHttpCallResponseSetPlatformNetworkErrorMessage](/zh-TW/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetplatformnetworkerrormessage.md)
- [HCHttpCallResponseGetPlatformNetworkErrorMessage](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetplatformnetworkerrormessage.md)
- [HCHttpCallResponseSetStatusCode](/zh-TW/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetstatuscode.md)
