Icmp* functions in iphlpapi.dll

Mike Hearn mike at plan99.net
Sun Jun 11 15:40:49 CDT 2006

On Sat, 10 Jun 2006 21:37:01 -0500, Carl Fongheiser wrote:
> Bad, bad idea.  In Windows programming, you *never* call LoadLibrary from
> DllMain.  Inside of DllMain, you can't call anything which uses the loader
> lock, because the loader lock is already taken out.  As best as I read the
> Wine code, it has the same limitation.

Loader lock is a recursive critical section so it's OK to do that from the
same thread and actually, the Wine loader code is written to allow that to

That said it's quite dangerous to do much of anything inside a DllMain
because so much stuff in Win32 relies on multiple threads or inter-thread
messaging behind your back.

thanks -mike

More information about the wine-devel mailing list