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

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Aug 30 14:51:00 GMT 2016

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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20160830/0e40a82b/attachment.sig>

More information about the Cygwin-developers mailing list