[PATCH v2] ntdll: Cache LDR_IMAGE_IS_DLL for InitDLL

Myah Caron qsniyg at protonmail.com
Mon Apr 6 06:43:12 CDT 2020


Thank you for explaining!!

However, that doesn't seem to match Windows's behavior, ldr.EntryPoint is always set, at least when tested under Windows 10 (you can test it with this commit: https://github.com/qsniyg/wine_dll_load_test/commit/d7df37845d0a6202ceafc9d44371e7fddd302768). Unless you were referring to something else? Sorry if I misunderstood!

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, April 6, 2020 4:29 AM, Alexandre Julliard <julliard at winehq.org> wrote:

> Myah Caron qsniyg at protonmail.com writes:
>
> > Sorry, I'm not quite sure I understand... how could I tweak the usage of ldr.EntryPoint in order to achieve the same result?
> > To clarify, the issue is that under Windows, it seems like Flags &
> > LDR_IMAGE_IS_DLL is only evaluated once at the beginning, and then
> > cached for the rest of the DLL's lifetime. No matter how Flags is
> > subsequently modified (even if it's modified before the initial
> > DllMain call), it will always seem to call DllMain if the
> > Characteristics was set as IMAGE_FILE_DLL.
>
> You'd make sure ldr.EntryPoint is set only when we actually have a dll
> entry point to call.
>
> ----------------------------------------------------------------------------------------------
>
> Alexandre Julliard
> julliard at winehq.org





More information about the wine-devel mailing list