For example, in language X:
let x = CreateOject( "MyProgID" )
x.LateBoundCall()
x.Release() // (or setting x to Nothing in VB-like language, etc)
What happens to the DLL MyProgID lives in? Does COM unload DLLs automatically?
EDIT
This is assuming that the code above is in an executable that does not expose any COM.
Yes, but not in a deterministic way. Windows periodically asks every loaded DLL “is it safe to unload you now?” Any DLL that responds “Yes” is unloaded.
Note a remark from MSDN :
See this Old New Thing article.