User Tools

Site Tools


unload_remove_a_called_dll_from_memory_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== UNLOAD (remove a CALLed DLL from memory) ====== Previous pageReturn to chapter overviewNext page

UNLOAD( file )

blk2blue.jpg

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:

CALL

unload_remove_a_called_dll_from_memory_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)