From 5f7be029976e3e5ad00901167ded70b5ca53ebb2 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Wed, 7 Jun 2023 09:46:58 +0200 Subject: [PATCH 15/17] headers: enabled LoadLibraryEx flags in Win10 19H1 UWP builds Signed-off-by: LIU Hao --- mingw-w64-headers/include/libloaderapi.h | 48 ++++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/mingw-w64-headers/include/libloaderapi.h b/mingw-w64-headers/include/libloaderapi.h index 00aa50f2a..6a5f59ed4 100644 --- a/mingw-w64-headers/include/libloaderapi.h +++ b/mingw-w64-headers/include/libloaderapi.h @@ -50,30 +50,6 @@ extern "C" { #define RESOURCE_ENUM_MODULE_EXACT (0x0010) #define SUPPORT_LANG_NUMBER 32 - -#define DONT_RESOLVE_DLL_REFERENCES 0x1 -#define LOAD_LIBRARY_AS_DATAFILE 0x2 -#define LOAD_WITH_ALTERED_SEARCH_PATH 0x8 -#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x10 -#define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x20 -#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x40 -#define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x80 -#define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x100 -#define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x200 -#define LOAD_LIBRARY_SEARCH_USER_DIRS 0x400 -#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x800 -#define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x1000 - -#if (NTDDI_VERSION >= NTDDI_WIN10_RS1) -#define LOAD_LIBRARY_SAFE_CURRENT_DIRS 0x00002000 -#define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER 0x00004000 -#else -#define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER LOAD_LIBRARY_SEARCH_SYSTEM32 -#endif - -#if (NTDDI_VERSION >= NTDDI_WIN10_RS2) -#define LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY 0x00008000 -#endif #endif /* WINAPI_PARTITION_DESKTOP */ #define GET_MODULE_HANDLE_EX_FLAG_PIN (0x1) @@ -166,6 +142,30 @@ typedef const REDIRECTION_DESCRIPTOR *PCREDIRECTION_DESCRIPTOR; #endif #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= NTDDI_WIN10_19H1 +#define DONT_RESOLVE_DLL_REFERENCES 0x1 +#define LOAD_LIBRARY_AS_DATAFILE 0x2 +#define LOAD_WITH_ALTERED_SEARCH_PATH 0x8 +#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x10 +#define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x20 +#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x40 +#define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x80 +#define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x100 +#define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x200 +#define LOAD_LIBRARY_SEARCH_USER_DIRS 0x400 +#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x800 +#define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x1000 + +#if (NTDDI_VERSION >= NTDDI_WIN10_RS1) +#define LOAD_LIBRARY_SAFE_CURRENT_DIRS 0x00002000 +#define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER 0x00004000 +#else +#define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER LOAD_LIBRARY_SEARCH_SYSTEM32 +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN10_RS2) +#define LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY 0x00008000 +#endif + WINBASEAPI HRSRC WINAPI FindResourceExW (HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, WORD wLanguage); WINBASEAPI HMODULE WINAPI GetModuleHandleA (LPCSTR lpModuleName); WINBASEAPI HMODULE WINAPI GetModuleHandleW (LPCWSTR lpModuleName); -- 2.37.3.windows.1