Unloading COM dlls, help needed

Neil Hodgson nhodgson at bigpond.net.au
Fri Jan 24 03:29:23 EST 2003


Thomas Heller:

> I think I got everything correct, COM reference counting seems OK,
> DllCanUnloadNow returns correct values, all I can think of.

   I recall much discussion of this sort of thing when I was doing COM work
several years ago with Microsoft applications avoiding and delaying
unloading DLLs because of bugs in COM objects.

   Google Groups for "CoFreeUnusedLibraries explorer" and you will see
comments like "I just did a couple of tests with SHLoadInProc on W2K and it
appears that they no longer bother about unloading DLLs at all. The 10
minute unload time of Win9x and NT4 may have been annoying, but it was
better than nothing." There is a technique for reducing the wait on other
versions of Windows:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer]
AlwaysUnloadDll=1
   Search for AlwaysUnloadDll on MSDN for some useful information.

   Neil






More information about the Python-list mailing list