> 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