There is no safe, reliable, cross-environment way to deal with closing a DLL. A DLL initialization function can allocate arbitrary resources, some of which may be in use by clients of the DLL when it is closed.
The only safe, consistent, reliable approach is not to close DLLs.
replies(6):