Use %windows%\system32 directory to search for the DLL. Standard search path is not used.
Signed-off-by: Carlos Palminha palminha@synopsys.com --- dlls/kernel32/module.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index badfe1d175..aff5097664 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -915,13 +915,19 @@ static HMODULE load_library( const UNICODE_STRING *libname, DWORD flags ) LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_USER_DIRS | - LOAD_LIBRARY_SEARCH_SYSTEM32 | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS;
if( flags & unsupported_flags) FIXME("unsupported flag(s) used (flags: 0x%08x)\n", flags);
- load_path = MODULE_get_dll_load_path( flags & LOAD_WITH_ALTERED_SEARCH_PATH ? libname->Buffer : NULL ); + if (flags & LOAD_LIBRARY_SEARCH_SYSTEM32) { + WCHAR spath[] = {'%','w','i','n','d','o','w','s','%','\','s','y','s','t','e','m','3','2',0}; + int slen = (strlenW(spath) + 1) * sizeof(WCHAR); + load_path = HeapAlloc(GetProcessHeap(), 0, slen); + memcpy (load_path, spath, slen); + } else { + load_path = MODULE_get_dll_load_path( flags & LOAD_WITH_ALTERED_SEARCH_PATH ? libname->Buffer : NULL ); + }
if (flags & LOAD_LIBRARY_AS_DATAFILE) {