From: Myah Caron Subject: Re: [PATCH v2] ntdll: Cache LDR_IMAGE_IS_DLL for InitDLL Message-Id: Date: Mon, 06 Apr 2020 11:08:30 +0000 In-Reply-To: <87blo4hpy4.fsf@wine> References: <87blo4hpy4.fsf@wine> 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 wrote: > Myah Caron qsniyg@protonmail.com writes: > > > Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48817 > > Signed-off-by: Myah Caron qsniyg@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@winehq.org