Unload a DLL

Dave Angel davea at ieee.org
Thu Feb 24 16:56:09 CET 2011


On 01/-10/-28163 02:59 PM, Sathish S wrote:
> Hi Ppl,
>
> I'm loading a dll using the *cdll.LoadLibrary *function. How can I release
> the dll after I'm done with it. Are there any functions to do this.
>
> Thanks,
> Sathish
>

In Windows, the FreeLibrary() call will decrement the load count, and 
unload the DLL if it reaches zero.  it's argument is the handle that 
LoadLibrary() returned.

I have no idea if that's available in the cdll Python interface, but it 
would make sense.

DaveA




More information about the Python-list mailing list