CfGetSyncRootInfoByPath function (cfapi.h)

Gets various sync root information given a file under the sync root.

Syntax

HRESULT CfGetSyncRootInfoByPath(
  [in]            LPCWSTR                 FilePath,
  [in]            CF_SYNC_ROOT_INFO_CLASS InfoClass,
  [out]           PVOID                   InfoBuffer,
  [in]            DWORD                   InfoBufferLength,
  [out, optional] DWORD                   *ReturnedLength
);

Parameters

[in] FilePath

A fully qualified path to a file whose sync root information is to be queried.

[in] InfoClass

Types of sync root information.

[out] InfoBuffer

A pointer to a buffer that will receive the sync root information.

[in] InfoBufferLength

Length, in bytes, of the InfoBuffer.

[out, optional] ReturnedLength

Length, in bytes, of the returned sync root information. Refer to CfRegisterSyncRoot for details about the sync root information.

Return value

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

Remarks

If the file is not underneath a cloud files sync root, the API will fail. On success, information is returned according to the specific InfoClass requested.

The InfoClass parameter can be one of the following values from CF_SYNC_ROOT_INFO_CLASS:

  • CF_SYNC_ROOT_INFO_BASIC
  • CF_SYNC_ROOT_INFO_STANDARD
  • CF_SYNC_ROOT_INFO_PROVIDER

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

CfRegisterSyncRoot

CfGetSyncRootInfoByHandle