From dfb88608e330ad3b93bb8a8f6bb1fecd3abe8a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Pluci=C5=84ski?= Date: Mon, 13 Sep 2010 13:39:31 +0200 Subject: [PATCH] kernel32: New flags added to LoadLibraryEx. --- dlls/kernel32/module.c | 8 ++++++++ include/winbase.h | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index 21db5cb55c1..4dded4e6dd6 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -848,6 +848,14 @@ static HMODULE load_library( const UNICODE_STRING *libname, DWORD flags ) NTSTATUS nts; HMODULE hModule; WCHAR *load_path; + static const DWORD unsupported_flags = + LOAD_IGNORE_CODE_AUTHZ_LEVEL | + LOAD_LIBRARY_AS_IMAGE_RESOURCE | + LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE | + LOAD_LIBRARY_REQUIRE_SIGNED_TARGET; + + if( flags & unsupported_flags) + FIXME("unsupported flag(s) used (flags: 0x%08x)\n", flags & ~unsupported_flags); load_path = MODULE_get_dll_load_path( flags & LOAD_WITH_ALTERED_SEARCH_PATH ? libname->Buffer : NULL ); diff --git a/include/winbase.h b/include/winbase.h index ea10696aabf..2c4b5d5fcee 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -803,9 +803,13 @@ DECL_WINELIB_TYPE_AW(ENUMRESNAMEPROC) DECL_WINELIB_TYPE_AW(ENUMRESLANGPROC) /* flags that can be passed to LoadLibraryEx */ -#define DONT_RESOLVE_DLL_REFERENCES 0x00000001 -#define LOAD_LIBRARY_AS_DATAFILE 0x00000002 -#define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008 +#define DONT_RESOLVE_DLL_REFERENCES 0x00000001 +#define LOAD_LIBRARY_AS_DATAFILE 0x00000002 +#define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008 +#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010 +#define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020 +#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x00000040 +#define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x00000080 #define GET_MODULE_HANDLE_EX_FLAG_PIN 1 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2