The
entry point
is exported by COM in-proc servers.
COM host applications call
periodically
to ask COM to do DLL housecleaning,
and in response, COM asks each DLL if it is okay to be unloaded.
If so, then COM unloads the DLL.
What is not well-known is that COM also does DLL housecleaning
when you shut down the last apartment by calling
.
...