Skip to content

Windows.Storage.Provider.StorageProviderSyncRootManager.Register returns HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) #2486

@PetrMinar

Description

@PetrMinar

The documentation should mention that there is a limit to the maximum length of StorageProviderSyncRootInfo::Id. Deep inside the Register function is this code:

StringCchPrintfW( 
    DestBuffer,
    260,
    L"%s\\%s\\CustomStates\\%d",
    L"Software\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager",
    L"... StorageProviderSyncRootInfo::Id ...",
    1);

When the ID is longer than 174 characters the function fails with mentioned error and leaves "semi-registered" storage provider that cannot be easily unregistered.

Metadata

Metadata

Assignees

Labels

Pri3Topic is in the bottom 50% of page views for the repo or was not created via Feedback control.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions