releases a DLL (dynamic link library)
FreeDll filename$
FreeDll explicitly releases a DLL from memory. The argument filename$ should be exactly the same as the DLL name specified in the Declare statement. Filename$ may contain a path.
Declare FunctionA WNetAddConnection Lib "mpr.dll" (ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As Long
// Use Dll
// release DLL
FreeDll "mpr.dll"
When a DLL function is invoked after its DLL has been released, the DLL is reloaded. This due to the nature of Declare, which instructs the compiler to generate code to check for a valid DLL before calling a DLL function.
{Created by Sjouke Hamstra; Last updated: 07/10/2014 by James Gaite}