Re: Can a windows DLL have more than one process attached? - Mailing list pgsql-interfaces

From Mikhail Terekhov
Subject Re: Can a windows DLL have more than one process attached?
Date
Msg-id 3C058873.8020308@emc.com
Whole thread Raw
In response to Re: Can a windows DLL have more than one process attached?  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-interfaces
 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/dll_8asu.asp
> 
>     Warning  On attach, the body of your DLL entry-point function
>     should perform only simple initialization tasks, such as
>     setting up thread local storage (TLS), creating objects, and
>     opening files. You must not call LoadLibrary  in the entry-point
>     function, because you may create dependency loops in the DLL load
>     order. This can result in a DLL being used before the system
>     has executed its initialization code. Similarly, you must not
>     call the FreeLibrary  function in the entry-point function on
>     detach, because this can result in a DLL being used after the
>     system has executed its termination code.
> 

I believe that in this particular case we are safe because we load netmsg.dll
as data (LOAD_LIBRARY_AS_DATAFILE).

Regards,
Mikhail



pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can a windows DLL have more than one process attached?
Next
From: Mikhail Terekhov
Date:
Subject: Re: Can a windows DLL have more than one process attached?