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

# HCMockResponseSetNetworkErrorCode

> HCMockResponseSetNetworkErrorCode

# HCMockResponseSetNetworkErrorCode

Définit le code d'erreur réseau à renvoyer pour la simulation.

## Syntaxe

```cpp theme={null}
HRESULT HCMockResponseSetNetworkErrorCode(  
         HCMockCallHandle call,  
         HRESULT networkErrorCode,  
         uint32_t platformNetworkErrorCode  
)  
```

### Paramètres

*call*   \_In\_\
Type : HCMockCallHandle

Handle de l'appel HTTP.

*networkErrorCode*   \_In\_\
Type : HRESULT

Code d'erreur réseau de l'appel HTTP.

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

Code d'erreur réseau spécifique à la plateforme de l'appel HTTP, à utiliser pour la journalisation / le débogage.

### Valeur de retour

Type : HRESULT

Code de résultat de cette opération d'API. Les valeurs possibles sont S\_OK, E\_INVALIDARG ou E\_FAIL.

## Configuration requise

**En-tête :** mock.h

**Bibliothèque :** libHttpClient.GDK.lib

## Voir aussi

[mock](/fr/reference/live/httpclient/mock/mock_members)


## Related topics

- [HCMockResponseSetStatusCode](/fr/reference/live/httpclient/mock/functions/hcmockresponsesetstatuscode.md)
- [HCHttpCallResponseSetNetworkErrorCode](/fr/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetnetworkerrorcode.md)
- [HCHttpCallResponseSetPlatformNetworkErrorMessage](/fr/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetplatformnetworkerrormessage.md)
- [HCHttpCallResponseGetNetworkErrorCode](/fr/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetnetworkerrorcode.md)
- [HCMockResponseSetHeader](/fr/reference/live/httpclient/mock/functions/hcmockresponsesetheader.md)
