This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: About the dll search algorithm of dlopen (patch-r3)


On Aug 29 18:50, Michael Haubenwallner wrote:
> On 08/26/2016 01:49 PM, Corinna Vinschen wrote:
> > On Aug 26 13:18, Corinna Vinschen wrote:
> > 
> > Apart from these minor bits and pieces, I really like this new
> > pathfinder class, btw.
> 
> Thank you! :)
> 
> While at it: Combining dlopen thoughts with the "forkables" background
> around replacing dlls-in-use leads me to this thought for redundant
> calls of dlopen:
> 
> As we've already agreed that GetModuleHandleEx might make sense,

Erm... where exactly did we do that?  I recall I mentioned using
LoadLibraryEx with LOAD_LIBRARY_SEARCH_USER_DIRS and the AddDllDirectory
functions, but I don't think we talked about GetModuleHandleEx.

The question is if it really makes sense to add calls to
GetModuleHandleEx.  Apart from slowing down the dlopen call, it seems
unnecessary.  Assuming you call LoadLibrary with the same paths and same
extensions in the same order, wouldn't a second call to dlopen have the
exact same result (loading the same file)?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]