> ## 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 调用的网络错误代码。

## Syntax

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

### Parameters

*call*   \_In\_\
Type: HCCallHandle

HTTP 调用的句柄。

*networkErrorCode*   \_In\_\
Type: HRESULT

HTTP 调用的网络错误代码。

*platformNetworkErrorCode*   \_In\_\
Type: uint32\_t

HTTP 调用特定于平台的网络错误代码，用于日志记录 / 调试。

### Return value

Type: HRESULT

此 API 操作的结果代码。可能的值为 S\_OK、E\_INVALIDARG 或 E\_FAIL。

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.GDK.lib

## See also

[httpProvider](/reference/live/httpclient/httpprovider/httpprovider_members)


## Related topics

- [HCMockResponseSetNetworkErrorCode](/zh-CN/reference/live/httpclient/mock/functions/hcmockresponsesetnetworkerrorcode.md)
- [HCHttpCallResponseGetNetworkErrorCode](/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetnetworkerrorcode.md)
- [HCHttpCallResponseSetPlatformNetworkErrorMessage](/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetplatformnetworkerrormessage.md)
- [HCHttpCallResponseSetStatusCode](/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetstatuscode.md)
- [XblHttpCallGetNetworkErrorCode](/zh-CN/reference/live/xsapi-c/http_call_c/functions/xblhttpcallgetnetworkerrorcode.md)
