[PATCH v2] ntdll: Cache LDR_IMAGE_IS_DLL for InitDLL

Alexandre Julliard julliard at winehq.org
Mon Apr 6 06:29:47 CDT 2020


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