From: Paul Gofman pgofman@codeweavers.com
--- dlls/kernel32/tests/module.c | 2 +- dlls/ntdll/loader.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/module.c b/dlls/kernel32/tests/module.c index c05af6a235a..586fb9f18bb 100644 --- a/dlls/kernel32/tests/module.c +++ b/dlls/kernel32/tests/module.c @@ -1696,7 +1696,7 @@ static void test_apiset_target_load(void) ok( hapiset != hlocal, "Got same module.\n" );
h = GetModuleHandleA( "shcore.dll" ); - todo_wine ok( h == hlocal, "Got %p, %p, %p.\n", h, hlocal, hapiset ); + ok( h == hlocal, "Got %p, %p, %p.\n", h, hlocal, hapiset );
h = GetModuleHandleA( system_path ); ok( h == hapiset, "Got %p, %p.\n", h, hapiset ); diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index e68c6ac6c05..c2f85d434ca 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -3241,6 +3241,8 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH LdrLoadDll(LPCWSTR path_name, DWORD flags,
RtlEnterCriticalSection( &loader_section );
+ cached_modref = NULL; + nts = load_dll( path_name, dllname ? dllname : libname->Buffer, flags, &wm, FALSE );
if (nts == STATUS_SUCCESS && !(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS)) @@ -3320,6 +3322,8 @@ NTSTATUS WINAPI LdrGetDllHandleEx( ULONG flags, LPCWSTR load_path, ULONG *dll_ch
RtlEnterCriticalSection( &loader_section );
+ cached_modref = NULL; + status = find_dll_file( load_path, dllname ? dllname : name->Buffer, &nt_name, &wm, &mapping, &image_info, &id );