Marcus Low wrote:
Hi,
I have been reading the documentation on ctypes and the 2.5 python on
ctypes when it comes to loading libraries.
But surprisingly, or maybe i miss it somewhere, but How do you unload
the loaded dll?
For eg : dllfunc = ctypes.CDLL("mylib.dll")
Later if i want to replace this dll without stopping the python program
and reload the dll, how can this be done?
I imagine this isn't such a common requirement, because
the FreeLibrary function is present in _ctypes but isn't
exposed via ctypes.
<code - untested>
import ctypes
import _ctypes
dllfunc = ctypes.CDLL("mylib.dll")
_ctypes.FreeLibrary (dllfunc._handle)
</code>
TJG
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32