Skip site navigation (1) Skip section navigation (2)

Re: Can a windows DLL have more than one process attached?

From: Mikhail Terekhov <terekhov(at)emc(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Can a windows DLL have more than one process attached?
Date: 2001-11-29 00:59:31
Message-ID: 3C058873.8020308@emc.com (view raw or flat)
Thread:
Lists: 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


In response to

pgsql-interfaces by date

Next:From: Mikhail TerekhovDate: 2001-11-29 01:17:02
Subject: Re: Can a windows DLL have more than one process attached?
Previous:From: Mikhail TerekhovDate: 2001-11-29 00:53:08
Subject: Re: Can a windows DLL have more than one process attached?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group