Function: unload

Unload a module from the process.

This function is safe

Modules are only ever unloaded from a process once their internal refcount reaches 0. This only decreases the refcount by 1.

Don’t repeatedly call this without reason, or you will unload the module from memory prematurely when it’s still being used 🐉.

Parameters

  • path: str - the full path to the dll.

Exceptions

If GetModuleHandleW or FreeLibrary fails.