DLLCanUnloadNow Question

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Fri Oct 7 03:50:17 CDT 2011


Hi,

The Following sample code causes a crash under WINE, but not in windows.

IUnknown *p

LoadLibrary("mscoree.dll")
GetProcAddress("CreateDebuggingInterfaceFromVersion")
CreateDebuggingInterfaceFromVersion(..., (void**)&p)  <-- Com Reference

FreeLibrary("mscoree.dll")

p->QueryInterface(....);        <-- Cause Crash under WINE.


The DLL shouldn't be unloaded since mscoree.DLLCanUnloadNow() return 
S_FALSE;

Is this a bug with the unloading of DLL's?  Is there way to stop the 
unloading of a DLL?

I know the logic isn't the best, but I'm seeing this type of behavior in an 
application.

Best Regards
 Alistair Leslie-Hughes 




More information about the wine-devel mailing list