Hi,

On 2023-05-28 10:51, LIU Hao wrote:
在 2023-05-27 18:05, Steve Lhomme 写道:
The documentation doesn't say it's allowed, but the WIndows SDK allow it and
the Windows App Certification as well.

The official page for allowed API's also doesn't say it's allowed [1]
but the DLL that contains it is there.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l2-1-0dll
---
  mingw-w64-headers/include/fileapi.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Compiling a program that calls it: With Windows 10 SDK 10.0.18362.0 this function is not declared for APP (only for DESKTOP), but with 10.0.22621.0 it is indeed declared. It might have changed inbetween so maybe we could have an `_WIN32_WINNT >= _WIN32_WINNT_????` there?

Indeed, here I have it in DESKTOP since 19041. So that's still a Windows 10 SDK (20H1), the latest being 19045 [1]. The API is not hidden by a NTDDI_VERSION check, so it should apply to all Windows 10 versions. And since the Windows App Certification doesn't differentiate between the Windows 10 versions, I think we can use it in all Windows 10 versions.

The definition is moved into a code block that is inside:

#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10

So I think it's OK like that.

[1] https://en.wikipedia.org/wiki/Windows_10_version_history

--
Best regards,
LIU Hao



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to