`CF_CONVERT_FLAG_FORCE_CONVERT_TO_CLOUD_FILE` docs unclear (cfapi)

oknick 101 Reputation points
2022-05-15T22:38:17.007+00:00

The docs for CF_CONVERT_FLAG_FORCE_CONVERT_TO_CLOUD_FILE state that without passing this flag, the conversion from a non-placeholder to a placeholder will normally fail. I don't understand, isn't converting a non-placeholder to a placeholder the point of calling CfConvertToPlaceholder? Why would it normally fail?

Does it mean that any file that already contains reparse data will normally fail when calling this function?

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,420 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Junjie Zhu - MSFT 14,526 Reputation points Microsoft Vendor
    2022-05-16T08:05:04.557+00:00

    Hello, @oknick
    Welcome to Microsoft Q&A!

    Isn't converting a non-placeholder to a placeholder the point of calling CfConvertToPlaceholder? Why would it normally fail?

    CF_CONVERT_FLAG_FORCE_CONVERT_TO_CLOUD_FILE convert a [non-cloud files placeholder] (having another reparse tag/data) to a [cloud files placeholder], This file is always a placeholder file before and after conversion.

    Does it mean that any file that already contains reparse data will normally fail when calling this function?

    No, your understanding is a bit biased, CfConvertToPlaceholder can be converted normally.
    [a non-cloud files placeholder (having another reparse tag/data)] is also a placeholder file.

    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][1] to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.