It's allowed by the WACK and available in windowsapp.lib since 19H1.
It's not allowed by the Windows SDK headers.
CreateFileW/A can be found in api-ms-win-core-file-l1-1-0. CreateFileW
was there even in Windows 8.
We need to remove it from windowsappcompat to avoid double definition
when linking.
---
mingw-w64-headers/include/fileapi.h | 4 ++--
mingw-w64-libraries/winstorecompat/Makefile.am | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/mingw-w64-headers/include/fileapi.h
b/mingw-w64-headers/include/fileapi.h
index a37b19366..20940806f 100644
--- a/mingw-w64-headers/include/fileapi.h
+++ b/mingw-w64-headers/include/fileapi.h
@@ -47,10 +47,11 @@ WINBASEAPI DWORD WINAPI SetFilePointer (HANDLE hFile, LONG
lDistanceToMove, PLON
} BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION,
*LPBY_HANDLE_FILE_INFORMATION;
WINBASEAPI WINBOOL WINAPI GetFileInformationByHandle (HANDLE hFile,
LPBY_HANDLE_FILE_INFORMATION lpFileInformation);
+ WINBASEAPI HANDLE WINAPI CreateFileA (LPCSTR lpFileName, DWORD
dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
+ WINBASEAPI HANDLE WINAPI CreateFileW (LPCWSTR lpFileName, DWORD
dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
- WINBASEAPI HANDLE WINAPI CreateFileA (LPCSTR lpFileName, DWORD
dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
WINBASEAPI WINBOOL WINAPI DefineDosDeviceW (DWORD dwFlags, LPCWSTR
lpDeviceName, LPCWSTR lpTargetPath);
WINBASEAPI WINBOOL WINAPI FindCloseChangeNotification (HANDLE hChangeHandle);
WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationA (LPCSTR lpPathName,
WINBOOL bWatchSubtree, DWORD dwNotifyFilter);
@@ -61,7 +62,6 @@ WINBASEAPI DWORD WINAPI SetFilePointer (HANDLE hFile, LONG
lDistanceToMove, PLON
WINBASEAPI WINBOOL WINAPI FindVolumeClose (HANDLE hFindVolume);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) ||
defined(WINSTORECOMPAT)
- WINBASEAPI HANDLE WINAPI CreateFileW (LPCWSTR lpFileName, DWORD
dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
WINBASEAPI DWORD WINAPI GetFileSize (HANDLE hFile, LPDWORD lpFileSizeHigh);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >=
_WIN32_WINNT_WIN10
diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am
b/mingw-w64-libraries/winstorecompat/Makefile.am
index 55fb45841..70aa0d27f 100644
--- a/mingw-w64-libraries/winstorecompat/Makefile.am
+++ b/mingw-w64-libraries/winstorecompat/Makefile.am
@@ -50,7 +50,6 @@ libwinstorecompat_a_SOURCES = \
libwindowsappcompat_a_SOURCES = \
src/LoadLibraryW.c \
- src/CreateFileW.c \
src/UnhandledExceptionFilter.c \
src/VirtualProtect.c \
src/getenv.c \
--
2.39.2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public