[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] stat: implement GetFileInformationByHandle with Winstore app
From: |
Steve Lhomme |
Subject: |
Re: [PATCH] stat: implement GetFileInformationByHandle with Winstore apps restrictions |
Date: |
Sat, 30 May 2020 15:57:38 +0200 (CEST) |
> On May 30, 2020 11:41 AM Bruno Haible <bruno@clisp.org> wrote:
>
>
> Hi,
>
> Steve Lhomme wrote:
> > GetFileInformationByHandle() cannot be called. But the same information can
> > be
> > gathered via calls to GetFileInformationByHandleEx() which is allowed.
>
> I am understanding from [1] that Microsoft is augmenting the list of allowed
> functions in UWP over time, and that ultimately most Windows API functions
> will
> be allowed in UWP in the end, because "developers want the Windows API".
Yes, they did add a lot of allowed API's between Win8 and Win10. But it's far
from the full API. A lot of API's are deprecated and they use that opportunity
to get rid of some old stuff. That's the same deal with the Universal C Runtime
which removed a lot of insecure calls. I think it's more likely some of the old
API's will not work in the future rather than allowing more and more people to
use it.
This API set is the one to use on Xbox for example. And it's not going away,
nor are they going to add some more old stuff.
> So, it makes sense to put your code into a separate library, that implements
> Windows API on top of UWP API. Gnulib focuses (partially) on providing the
> POSIX and glibc API on top of the Windows API.
That's the case in mingw-w64 which has winstorecompat to mimick some of the
forbidden APIs without having to recompile the code:
https://github.com/mirror/mingw-w64/tree/master/mingw-w64-libraries/winstorecompat
You can see one of the last commit is adding GetFileInformationByHandle() for
example. But that means anyone building with an older version of winstorecompat
cannot rely on this helper.
> The two, that is the Windows API emulation on top of UWP API and Gnulib, ought
> to work seamlessly together (assuming that other library does not have GPL-
> incompatible license terms).
>
> Bruno
>
> [1]
> https://www.thurrott.com/dev/206351/microsoft-confirms-uwp-is-not-the-future-of-windows-apps