CfReportProviderProgress function (cfapi.h)

Allows a sync provider to report progress out-of-band.

Syntax

HRESULT CfReportProviderProgress(
  [in] CF_CONNECTION_KEY ConnectionKey,
  [in] CF_TRANSFER_KEY   TransferKey,
  [in] LARGE_INTEGER     ProviderProgressTotal,
  [in] LARGE_INTEGER     ProviderProgressCompleted
);

Parameters

[in] ConnectionKey

A connection key representing a communication channel with the sync filter.

[in] TransferKey

An opaque handle to the placeholder.

[in] ProviderProgressTotal

The total progress of the sync provider in response to a fetch data callback.

[in] ProviderProgressCompleted

The completed progress of the sync provider in response to a fetch data callback.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The filter automatically tracks the progress of hydrations, by tracking ranges that are transferred and/or acknowledged in response to FETCH_DATA callbacks. However, if a provider spends the bulk of its time downloading content to a temporary location before beginning to TRANSFER_DATA to the filter, the filter would otherwise be unaware that these activities are in any way related to the request.

By calling CfReportProviderProgress periodically, the sync provider can report progress to the filter, thereby resetting the 60 second timeout period corresponding to the CF_CALLBACK_TYPE_FETCH_DATA callback. This will also make the progress appear smoother.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1709 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header cfapi.h
Library CldApi.lib
DLL CldApi.dll

See also

CfReportProviderProgress2

CF_CALLBACK_TYPE