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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-interfaces by date

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