unload_remove_a_called_dll_from_memory_.htm
Navigation: Language Reference > 13 - Built-in Functions >====== UNLOAD (remove a CALLed DLL from memory) ====== | |
UNLOAD( file )
UNLOAD | Unloads a Windows standard .DLL previously loaded by CALL. |
file | A string constant, variable, or expression containing the name (including extension) of the .DLL to unload. This may include a full path. |
The UNLOAD procedure unloads a .DLL file left loaded by the CALL procedure.
Example:
Win1 WINDOW
BUTTON('Load DLL'),USE(?DLLButton)
END
CODE
OPEN(Win1)
ACCEPT
CASE EVENT()
OF EVENT:Accepted
IF ACCEPTED() = ?DLLButton
!Call procedure in CUSTOM.DLL and leave DLL resident:
X# = CALL('CUSTOM.DLL','EntryPoint',1)
IF X# THEN STOP(X#) END !Check for successful execution
END
OF EVENT:CloseWindow
UNLOAD('CUSTOM.DLL') !Unload the CUSTOM.DLL
END
END
!Process
See Also:
unload_remove_a_called_dll_from_memory_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1