On 6/10/06, Simon Kissane skissane@gmail.com wrote:
Suppose one was to add code to iphlpapi's LibMain which did LoadLibrary & GetProcAddress to get the addresses of the functions in icmp.dll, and then the iphlpapi implementations just called the icmp.dll implementations? (I'm assuming doing a static import would result in some kind of name collission?)
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.
Carl Fongheiser