The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 19041 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-libraryloader-l1-2-0 in mincore and windowsapp.

[1] 
https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-libraryloader-l1-2-0dll
---
 mingw-w64-headers/include/libloaderapi.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-headers/include/libloaderapi.h 
b/mingw-w64-headers/include/libloaderapi.h
index 25bacfd29..26f957131 100644
--- a/mingw-w64-headers/include/libloaderapi.h
+++ b/mingw-w64-headers/include/libloaderapi.h
@@ -89,8 +89,6 @@ extern "C" {
   WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE hModule, LPCWSTR lpName, 
LPCWSTR lpType);
   WINBASEAPI WINBOOL WINAPI FreeResource (HGLOBAL hResData);
   WINBASEAPI HGLOBAL WINAPI LoadResource (HMODULE hModule, HRSRC hResInfo);
-  WINUSERAPI int WINAPI LoadStringA (HINSTANCE hInstance, UINT uID, LPSTR 
lpBuffer, int cchBufferMax);
-  WINUSERAPI int WINAPI LoadStringW (HINSTANCE hInstance, UINT uID, LPWSTR 
lpBuffer, int cchBufferMax);
   WINBASEAPI LPVOID WINAPI LockResource (HGLOBAL hResData);
   WINBASEAPI DLL_DIRECTORY_COOKIE WINAPI AddDllDirectory (PCWSTR NewDirectory);
   WINBASEAPI WINBOOL WINAPI RemoveDllDirectory (DLL_DIRECTORY_COOKIE Cookie);
@@ -101,8 +99,6 @@ extern "C" {
 #define FindResource FindResourceW
 #endif
 
-#define LoadString __MINGW_NAME_AW(LoadString)
-
 #define EnumResourceLanguages __MINGW_NAME_AW(EnumResourceLanguages)
   WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesA(HMODULE hModule,LPCSTR 
lpType,LPCSTR lpName,ENUMRESLANGPROCA lpEnumFunc,LONG_PTR lParam);
   WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesW(HMODULE hModule,LPCWSTR 
lpType,LPCWSTR lpName,ENUMRESLANGPROCW lpEnumFunc,LONG_PTR lParam);
@@ -186,6 +182,13 @@ typedef const REDIRECTION_DESCRIPTOR 
*PCREDIRECTION_DESCRIPTOR;
 #define PGET_MODULE_HANDLE_EX __MINGW_NAME_AW(PGET_MODULE_HANDLE_EX)
 #endif
 
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= 
NTDDI_WIN10_VB
+  WINUSERAPI int WINAPI LoadStringA (HINSTANCE hInstance, UINT uID, LPSTR 
lpBuffer, int cchBufferMax);
+  WINUSERAPI int WINAPI LoadStringW (HINSTANCE hInstance, UINT uID, LPWSTR 
lpBuffer, int cchBufferMax);
+
+#define LoadString __MINGW_NAME_AW(LoadString)
+#endif
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.39.2



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

Reply via email to