question

oknick avatar image
0 Votes"
oknick asked JunjieZhu-MSFT edited

Registering a sync root via Win32 API is missing documentation (cfapi)

Looking at the UWP API for registering a sync root via StorageProviderSyncRootInfo, it seems to have many more fields that the Win32 API does not. To be specific, the AllowPinning, FallbackFileTypeInfo, IconResource, ProtectionMode, RecycleBinUri, ShowSiblingsAsGroup, and StorageProviderItemPropertyDefinitions fields.

The UWP API automatically takes care of registration with the shell, which is why it has so much more, but in the documentation to manually register a sync root with the shell, found here, it does not mention these properties.

I can find most of them by looking through the registry, although they should be officially documented.

windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JunjieZhu-MSFT avatar image
1 Vote"
JunjieZhu-MSFT answered JunjieZhu-MSFT edited

Hello,
Welcome to Microsoft Q&A!

According to the official documentation Build a Cloud Sync Engine that Supports Placeholder Files,

The cloud files API contains the following native Win32 APIs and Windows Runtime (WinRT) API
Windows.Storage.Provider namespace: This WinRT API enables applications to configure the cloud storage provider and register the sync root with the operating system.

At present, there is no Win32 API document related to sync root properties, it needs to be used in conjunction with the WinRT API.

Thank you.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

There is a Win32 API for registering a sync root, CfRegisterSyncRoot. It just doesn’t register it with the shell, although the documentation I linked gives a tutorial on how to do this. My problem is that the tutorial does not mention some of the properties that could be set and that are already set via the UWP API.

0 Votes 0 ·

Could you please submit the feedback via the document page?
We will take your advice and update the relevant documents.
202622-image.png


0 Votes 0 ·
image.png (63.4 KiB)