[python-win32] Re: [Py2exe-users] DllUnregister Question.

Blake Winton bwinton at latte.ca
Fri Oct 8 01:41:03 CEST 2004


Mark Hammond wrote:
>>Specifically, DllUnregisterServer calls check_init, which calls
 >>load_pythoncom, which calls LoadLibraryEx.  I suggest that we
 >>add a check_deinit() method, to be called just before we
>>return, which calls unload_pythoncom, which calls FreeLibrary.
> *Every* DLL used by the program must be unloaded - that includes
> Pythonxx.dll and all the .pyd files used by Python.  Python simply
 > doesn't clean up after itself that well.

Okay, and I'm guessing that that would be very hard to do?  Could we 
store the list of open libraries before and after we load Pythonxx.dll, 
and then close them all in our check_deinit() method?  I haven't done 
much Win32 programming, so I'm a little out of my depth here.

If that's really hard to do, could we at least unload pythonxx.dll, so 
that I can complain to the base python people that they aren't cleaning 
up after themselves?  ;)

Thanks,
Blake.


More information about the Python-win32 mailing list