CfUnregisterSyncRoot function (cfapi.h)
Unregisters a previously registered sync root.
Syntax
HRESULT CfUnregisterSyncRoot(
[in] LPCWSTR SyncRootPath
);
Parameters
[in] SyncRootPath
The path to the sync root to be unregistered.
Return value
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Unregisters a sync root that was registered with CfRegisterSyncRoot. This is typically called at the sync provider uninstall time, when a user account is deleted, or when a user opts to no longer sync a directory tree (if supported by the sync provider).
The sync provider should have WRITE_DATA or WRITE_DAC access to the sync root to be unregistered, or unregistration will fail with: HRESULT(ERROR_CLOUD_FILE_ACCESS_DENIED).
Unregisters a sync root by traversing the directory tree of the sync root.
For placeholder files:
- If a placeholder file is fully hydrated, it is reverted back to a "normal" file.
- If a placeholder file is not hydrated, it is permanently deleted from the local machine.
- If a placeholder directory is fully populated, it is reverted back to a "normal" directory.
- If a placeholder directory is not fully populated, the directory is permanently deleted from the local machine.
Requirements
| 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 |