What's the purpose of the fileapifromapp.h API?

Viewed 50

There's a set of 11 functions in the fileapifromapp.h SDK header file. The supporting documentation lacks information on why that API exists, or which specific problem it addresses. Take CreateFileFromAppW as an example, whose documented purpose is:

Creates or opens a file or I/O device. The behavior of this function is identical to CreateFile, except that this function adheres to the Universal Windows Platform app security model.

So, it's like CreateFile, but can be used from a UWP application. That's not entirely confusing. What is confusing is, that that's exactly what CreateFile2, introduced in Windows 8, was supposed to accomplish. So why do we have 2 APIs now that apparently solve the same problem?

The documentation of CreateFileFromAppW doesn't reference the documentation of CreateFile2 to explain how it is different, nor vice versa. I can't seem to find an answer to these questions:

  • Why did Windows 10 1803 introduce CreateFileFromAppW when we already had CreateFile2 since Windows 8?
  • Does CreateFileFromAppW offer different functionality compared to CreateFile2?
0 Answers
Related