2

I'm using the Windows Cloud Filter API to write a sync provider, but my calls to CfCreatePlaceholders are always failing.

Here's an example of the code I run once my provider is all connected:

CF_PLACEHOLDER_CREATE_INFO cInfo[1] = { 0 };
cInfo[0].RelativeFileName = L"testfile";
cInfo[0].FsMetadata.BasicInfo.FileAttributes = FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_DIRECTORY;
cInfo[0].Flags = CF_PLACEHOLDER_CREATE_FLAG_NONE;

...

HRESULT ret = CfCreatePlaceholders(basePath, cInfo, 1, CF_CREATE_FLAG_STOP_ON_ERROR, &EntriesProcessed);

I expect CfCreatePlaceholders to return S_OK, but instead it returns 0x8007017C (ERROR_CLOUD_FILE_INVALID_REQUEST). What am I doing wrong?

j_6582
  • 161
  • 9

1 Answers1

3

Since I posted my question, I found Microsoft's sample app that demonstrates how to use this API. That sample shows several things that are not clear in the documentaiton.

In case it will help anyone else: Cloud Mirror Sample

j_6582
  • 161
  • 9
  • 2
    So... Microsoft, a sample for Cloud Storage Provider/Sync Root Manager/Cloud Filter/Files On-Demand/On-Demand Sync is now called Cloud Mirror? – fjch1997 Oct 10 '19 at 15:18