Skip to main content

HCHttpCallRequestGetProgressReportFunction

Gets the upload or download progress callback, minimum report interval, and context that the title set on an HTTP call. Custom HTTP implementations use this function to report transfer progress.

Syntax

Parameters

call   _In_
Type: HCCallHandle
The handle of the HTTP call. isUploadFunction   _In_
Type: bool
true to get the upload progress callback; false to get the download progress callback. progressReportFunction   _Out_
Type: HCHttpCallProgressReportFunction*
Receives the progress callback. Receives nullptr if the title didn’t set one. minimumProgressReportInterval   _Out_
Type: size_t*
Receives the minimum interval, in seconds, between progress reports. The default is 2 seconds. context   _Out_
Type: void**
Receives the context pointer that the title passed with the callback.

Return value

Type: HRESULT Returns S_OK on success, or E_INVALIDARG if any pointer parameter is nullptr.

Remarks

The title sets these values with HCHttpCallRequestSetProgressReportFunction before it calls HCHttpCallPerformAsync. If you implement HCCallPerformFunction and the returned callback isn’t nullptr, call it with the call handle, the bytes transferred so far, the total size, and the returned context. Wait at least minimumProgressReportInterval seconds between calls. If the title marked the body as dynamic, use HCHttpCallRequestGetDynamicBytesWritten or HCHttpCallResponseGetDynamicBytesWritten for the values to report. The built-in WinHTTP provider on Windows and XBOX consoles follows this pattern.

Requirements

Header: httpProvider.h Library: libHttpClient.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

httpProvider
HCCallPerformFunction
HCHttpCallProgressReportFunction
Last modified on October 30, 2026