Skip to main content
Creates a mock HTTP call handle.

Syntax

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 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
Last modified on October 30, 2026