From fc8b376a55a883b0e1f53b8631364dcca5f85721 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 24 Feb 2004 01:25:03 +0000 Subject: [PATCH] Return right away from import_dll when a dll is not found to avoid displaying many useless function errors. --- dlls/ntdll/loader.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 40f2063d0c..207ec281ef 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -363,20 +363,17 @@ static WINE_MODREF *import_dll( HMODULE module, IMAGE_IMPORT_DESCRIPTOR *descr, if (status) { if (status == STATUS_DLL_NOT_FOUND) - ERR("Module (file) %s (which is needed by %s) not found\n", + ERR("Library %s (which is needed by %s) not found\n", name, debugstr_w(current_modref->ldr.FullDllName.Buffer)); else - ERR("Loading module (file) %s (which is needed by %s) failed (error %lx).\n", + ERR("Loading library %s (which is needed by %s) failed (error %lx).\n", name, debugstr_w(current_modref->ldr.FullDllName.Buffer), status); - imp_mod = NULL; - exports = NULL; - } - else - { - imp_mod = wmImp->ldr.BaseAddress; - exports = RtlImageDirectoryEntryToData( imp_mod, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &exp_size ); + return NULL; } + imp_mod = wmImp->ldr.BaseAddress; + exports = RtlImageDirectoryEntryToData( imp_mod, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &exp_size ); + if (!exports) { /* set all imported function to deadbeef */