CfSetCorrelationVector function (cfapi.h)

Allows a sync provider to instruct the platform to use a specific correlation vector for telemetry purposes on a placeholder file. This is optional.

Syntax

HRESULT CfSetCorrelationVector(
  [in] HANDLE                    FileHandle,
  [in] const PCORRELATION_VECTOR CorrelationVector
);

Parameters

[in] FileHandle

The handle to the placeholder file. The platform properly synchronizes the operation with other active requests. An attribute or no-access handle is sufficient.

[in] CorrelationVector

A specific correlation vector to be associated with the FileHandle.

Return value

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

Remarks

The platform automatically assigns a correlation vector to each file when it is first opened, and provides this correlation vector with each callback to the sync provider as part of the common CF_CALLBACK_INFO. It is suggested that the sync engine call this function to increment the last digit of the correlation vector “clock” as the sync provider progresses through internal stages (as defined by the sync provider) of satisfying the request.

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

CF_CALLBACK_INFO