CfExecute function (cfapi.h)

The main entry point for all connection key based placeholder operations. It is intended to be used by a sync provider to respond to various callbacks from the platform.

Syntax

HRESULT CfExecute(
  [in]      const CF_OPERATION_INFO *OpInfo,
  [in, out] CF_OPERATION_PARAMETERS *OpParams
);

Parameters

[in] OpInfo

Information about an operation on a placeholder.

[in, out] OpParams

Parameters of an operation on a placeholder.

Return value

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

Remarks

A valid call to CfExecute will reset the timers of all pending callback requests that belong to the same sync provider process.

CfExecute takes two variable-sized arguments, i.e., CF_OPERATION_INFO and CF_OPERATION_PARAMETERS, with one identifying the operation type and the other supplying detailed operation parameters. Both arguments start with a StructSize field at the beginning of the corresponding structures. Callers of CfExecute are responsible for accurate accounting of the structure size.

The platform provides ConnectionKey, TransferKey, and CorrelationVector to all callback functions registered with CfConnectSyncRoot. Additionally, sync providers can obtain TransferKey using CfGetTransferKey and CorrelationVector using CfGetCorrelationVector.

Optionally, sync providers can supply a sync status blob to the platform. If a non-null pointer is set in the SyncStatus field in CF_OPERATION_INFO, its content will be retained on the file until the last handle on it is removed. The platform will query this information upon any failed operations on a cloud file placeholder. If one is available, the platform will use the information provided to construct a more meaningful and actionable message to the user.

If a null pointer is set in the SyncStatus field in CF_OPERATION_INFO, the platform will clear the previously set sync status (if one exists).

All operations can be performed in an arbitrary thread context in the sync provider process.

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

CfConnectSyncRoot

CfGetCorrelationVector

CF_OPERATION_INFO

CF_OPERATION_PARAMETERS