[PATCH v2] ntdll: Cache LDR_IMAGE_IS_DLL for InitDLL

Myah Caron qsniyg at protonmail.com
Mon Apr 6 06:08:30 CDT 2020


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.

Thank you for looking into this!! :)

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

> Myah Caron qsniyg at protonmail.com writes:
>
> > Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48817
> > Signed-off-by: Myah Caron qsniyg at protonmail.com
> >
> > --------------------------------------------------------------------------------------------------------
> >
> > v2: Only cache LDR_IMAGE_IS_DLL.
> > Using a cached version for all flags can cause issues with Battle.net and Warframe (Thanks GloriousEggroll for testing!)
> > Supersedes "ntdll: Use a cached version of LDR_MODULE flags for InitDLL."
> >
> > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> This looks like a hack. You could probably tweak the ldr.EntryPoint
> usage instead for that purpose.
>
> ------------------------------------------------------------------------------------------------------
>
> Alexandre Julliard
> julliard at winehq.org





More information about the wine-devel mailing list