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

# HCMockCallCreate

> Creates a mock HTTP call handle.

Creates a mock HTTP call handle.

## Syntax

```cpp theme={null}
HRESULT HCMockCallCreate(  
         HCMockCallHandle* call  
)  
```

### Parameters

*call*   \_Out\_\
Type: HCMockCallHandle\*

The handle of the mock HTTP call.

### Return value

Type: HRESULT

Result code for this API operation. Possible values are S\_OK, E\_INVALIDARG, E\_HC\_NOT\_INITIALISED, or E\_FAIL. Returns E\_HC\_NOT\_INITIALISED if libHttpClient isn't initialized; call [HCInitialize](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hcinitialize.md) first.

## Remarks

First create an HTTP handle using HCMockCallCreate(). Then call HCMockResponseSet\*() to prepare the HC\_MOCK\_CALL\_HANDLE. Then call HCMockAddMock() to add it to the system. Call HCMockRemoveMock() to remove the mock call from the system. Then call HCMockCallCloseHandle() to close the handle and clean up the mock call.

## Requirements

**Header:** mock.h

**Library:** libHttpClient.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[mock](https://docs.xbox.com/reference/live/httpclient/mock/mock_members.md)


## Related topics

- [mock (contents)](https://docs.xbox.com/reference/live/httpclient/mock/mock_members.md)
- [HCMockAddMock](https://docs.xbox.com/reference/live/httpclient/mock/functions/hcmockaddmock.md)
- [HCMockRemoveMock](https://docs.xbox.com/reference/live/httpclient/mock/functions/hcmockremovemock.md)
- [HCMockSetMockMatchedCallback](https://docs.xbox.com/reference/live/httpclient/mock/functions/hcmocksetmockmatchedcallback.md)
- [HCMockCallCloseHandle](https://docs.xbox.com/reference/live/httpclient/mock/functions/hcmockcallclosehandle.md)
