What is the behavior of file ranges in different parts of the cfapi?

oknick 101 Reputation points
2022-02-05T05:07:56.993+00:00

In the CfHydratePlaceholder and CfDehydratePlaceholder functions, it is explicitly said that a length parameter of -1 indicates EOF. However, in other functions and structs around the API, it is not so clear. For example, CF_FILE_RANGE, AckData (in CF_OPERATION_PARAMETERS), and ValidateData (in CF_CALLBACK_PARAMETERS). Do the functions/structs I listed have the same behavior (-1 to indicate EOF) or not?

Also, side question: is CfDehydratePlaceholder deprecated? It's only documented in the legacy docs, yet it's used in the cloud-mirror sample.

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

Accepted answer
  1. Xiaopo Yang - MSFT 11,256 Reputation points Microsoft Vendor
    2022-02-07T06:49:47.553+00:00

    Hello,

    Welcome to Microsoft Q&A!

    If the document doesn‘t say -1 indicates EOF, these functions/structs don't have the same behavior. Also CloudMirror doesn't use the undocumented value -1.
    For CfDehydratePlaceholder document, I‘m trying to consult the one who is more likely to know the answer.

    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.


0 additional answers

Sort by: Most helpful