On Fri, 13 Dec 2019, Steve Lhomme wrote:
Hi,
On 2019-12-12 22:13, Martin Storsjö wrote:
On Thu, 12 Dec 2019, Steve Lhomme wrote:
WINAPI_FAMILY_DESKTOP_APP is
(WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)
(ie available for desktop and store apps)
The current macro results in:
(WINAPI_FAMILY & (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)) ==
(WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)
One is not supposed to use WINAPI_FAMILY_PARTITION(<family>), one is
supposed to do WINAPI_FAMILY_PARTITION(<partition>). So the code that
You're right.
I think in general this header could do with some more comments.
Everytime I look at it I have to scratch my head wondering which is which.
Yes, and I'm not entirely sure that all other functions are correctly
grouped as well. For example, CreateFileW is in a block available for
"WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >=
_WIN32_WINNT_WIN10", but even on win10, it's desktop-only, or more
precisely, "WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP |
WINAPI_PARTITION_SYSTEM)".
Also the proper family for Winstore app is WINAPI_FAMILY_PC_APP, adding
to the confusion. WINAPI_FAMILY_APP is a legacy from the Windows 8 SDK.
https://github.com/microsoft/Windows-universal-samples/blob/fe8567faf2efdea3672c2ba642ba7b925ff6467e/Samples/Geolocation/cpp/BackgroundTask/LocationBackgroundTask.cpp#L86
Yep. The partition defines in mingw-w64 still are from the Win8 level;
they've evolved a bit since then in WinSDK, and it's pretty non-obvious in
certain places. But what we have right now should generally be fine for
most cases. Bringing the defines to a newer form requires closely studying
the historic changes wrt family/partition defines in WinSDK from 8.0 via
8.1 to 10, and ideally the corresponding changes in the WinPhone SDK as
well.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public