[PATCH v4 3/3] ntdll: Don't use find_basename_module for sxs dlls
Fabian Maurer
dark.shadow4 at web.de
Thu Jun 20 10:50:32 CDT 2019
Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
dlls/kernel32/tests/actctx.c | 5 -----
dlls/ntdll/loader.c | 9 ++++++---
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index 76368e273e..7395e8db10 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -3300,12 +3300,10 @@ static void test_two_dlls_at_same_time(void)
if (!fill_sxs_info(&dll_2, "2", "dummy.dll", two_dll_manifest_exe, two_dll_manifest_dll, TRUE))
goto cleanup;
- todo_wine
ok(dll_1.module != dll_2.module, "Libraries are the same\n");
dll_1.get_path(path1, sizeof(path1));
ok(strcmp(path1, dll_1.path_dll) == 0, "Got '%s', expected '%s'\n", path1, dll_1.path_dll);
dll_2.get_path(path2, sizeof(path2));
- todo_wine
ok(strcmp(path2, dll_2.path_dll) == 0, "Got '%s', expected '%s'\n", path2, dll_2.path_dll);
cleanup:
@@ -3338,10 +3336,8 @@ static void test_one_sxs_and_one_local_1(void)
if (!fill_sxs_info(&dll, "1", "dummy.dll", two_dll_manifest_exe, two_dll_manifest_dll, TRUE))
goto cleanup;
- todo_wine
ok(dll.module != module, "Libraries are the same\n");
dll.get_path(path1, sizeof(path1));
- todo_wine
ok(strcmp(path1, dll.path_dll) == 0, "Got '%s', expected '%s'\n", path1, dll.path_dll);
get_path(path2, sizeof(path2));
ok(strcmp(path2, path_dll_local) == 0, "Got '%s', expected '%s'\n", path2, path_dll_local);
@@ -3417,7 +3413,6 @@ static void test_one_with_sxs_and_GetModuleHandleA(void)
ok(success, "ActivateActCtx failed: %d\n", GetLastError());
module_temp = GetModuleHandleA("sxs_dll.dll");
- todo_wine
ok (module_temp == 0, "Expected 0, got %p\n", module_temp);
DeactivateActCtx(0, dll.cookie);
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index c6d37ab14e..0c8830a638 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2726,10 +2726,13 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname,
if (!contains_path( libname ))
{
WCHAR *fullname = NULL;
+ NTSTATUS status_actctx = find_actctx_dll( libname, &fullname );
+ if (status_actctx != STATUS_SUCCESS)
+ {
+ if ((*pwm = find_basename_module( libname )) != NULL) goto done;
+ }
+ status = status_actctx;
- if ((*pwm = find_basename_module( libname )) != NULL) goto done;
-
- status = find_actctx_dll( libname, &fullname );
if (status == STATUS_SUCCESS)
{
TRACE ("found %s for %s\n", debugstr_w(fullname), debugstr_w(libname) );
--
2.22.0
More information about the wine-devel
mailing list