I get Error 0x80070057 when I use the CfCreatePlaceholder function from the Cloud Filter API

anon_357246 1 Reputation point
2023-01-08T08:17:23.603+00:00

I am using a Windows 10 laptop.
i am using the Cloud Filter API and I want to create a placeholder in the sync root directory.
This is how I initialised the place_holder table:
// SyncRoot is already created
SyncRoot.c_str = "C:\client"
FilePath.c_str() = "file.bin"
CF_PLACEHOLDER_CREATE_INFO place_holders[1];
place_holders[0].RelativeFileName = FilePath.c_str();
place_holders[0].FsMetadata.BasicInfo.FileAttributes = FILE_ATTRIBUTE_NORMAL;
place_holders[0].FsMetadata.FileSize.QuadPart = 1024 * 1024 * 1024;
place_holders[0].Flags = CF_PLACEHOLDER_CREATE_FLAG_SUPERSEDE | CF_PLACEHOLDER_CREATE_FLAG_MARK_IN_SYNC;
place_holders[0].FileIdentity = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 0x130);
place_holders[0].FileIdentityLength = 0x130;
DWORD processed;
res = CfCreatePlaceholders(SyncRoot.c_str(), place_holders, 1, CF_CREATE_FLAG_NONE, &processed);
But it returns an error 0x80070057.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,987 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,712 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,566 Reputation points
    2023-01-10T08:25:13.39+00:00

    Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.

    Windows encountered a storage problem, as indicated by the 0x80070057 error code. It's possible that there wasn't enough room on your hard disk or SSD to download or copy files. However, this error could also be an indication of a hard drive corruption, an incompatible file system, or any other storage-related problem.

    A missing update may be the reason why error code 0x80070057 appeared if Windows Update was not the source. Press Win + I, then do the following to see whether you have any pending updates:

    From the Settings app, select the Windows Update option, then click Check for updates.

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.