Re: Give a more informative error when a DLL fails to initialize
Hi Alexandre, This patch was missed, does it no longer apply? Also is it OK to just put the changelog as the first line of the email like that? thanks -mike On Wed, 22 Dec 2004 18:19:47 +0000, Mike Hearn wrote:
Give a more informative error when a DLL fails to initialize --- dlls/ntdll/loader.c (revision 3) +++ dlls/ntdll/loader.c (local) @@ -893,9 +893,14 @@ static NTSTATUS process_attach( WINE_MOD WINE_MODREF *prev = current_modref; current_modref = wm; if (MODULE_InitDLL( wm, DLL_PROCESS_ATTACH, lpReserved )) + { wm->ldr.Flags |= LDR_PROCESS_ATTACHED; + } else + { + ERR("Initialization of %s failed\n", debugstr_w(wm->ldr.BaseDllName.Buffer)); status = STATUS_DLL_INIT_FAILED; + } current_modref = prev; }
Mike Hearn <mike(a)navi.cx> writes:
This patch was missed, does it no longer apply?
It needs to be at most a warning, attach failures can legitimately happen.
Also is it OK to just put the changelog as the first line of the email like that?
Sure. -- Alexandre Julliard julliard(a)winehq.org
On Mon, 2005-01-10 at 17:19 +0100, Alexandre Julliard wrote:
It needs to be at most a warning, attach failures can legitimately happen.
OK, here's a better patch fixed w.r.t what we talked about on IRC. Give a more informative error when a DLL fails to initialize during startup
Mike Hearn wrote: ...
static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_MODREF** pwm ); static FARPROC find_named_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports, @@ -893,9 +894,17 @@ static NTSTATUS process_attach( WINE_MOD WINE_MODREF *prev = current_modref; current_modref = wm; if (MODULE_InitDLL( wm, DLL_PROCESS_ATTACH, lpReserved )) + { wm->ldr.Flags |= LDR_PROCESS_ATTACHED; + }
You don't need to add these unnecessary brackets. They add nothing to the readability of the code. Rob
On Mon, 2005-01-10 at 11:31 -0600, Robert Shearman wrote:
You don't need to add these unnecessary brackets. They add nothing to the readability of the code.
I normally wouldn't but the code style in that section is to avoid stuff like this: if (foo) bar else { baz } which I do think looks weird and detracts from the readability. It's not a big deal at any rate.
participants (3)
-
Alexandre Julliard -
Mike Hearn -
Robert Shearman