DeleteDll
DeleteDll DLLNumber
 
Parameters:

    DLLNumber = The number of the DLL you wish to delete
Returns: NONE
 

      DeleteDll will free the memory used by a DLL back to PlayBASIC and ultimately windows.



FACTS:


      * You can only use standard DLLs. See NewAx for ActiveX/COM DLLs



Mini Tutorial:


      This example shows how to toggle the visibility of the mouse cursor using Windows' user32.dll.

  
; Ask PlayBASIC for the Image Index that is currently free for use.
  User32 = GetFreeDll()
  
; Check if the DLL file exists
  
  If GetDllExist("user32.dll"<> 1
     Print "DLL doesn't exist"
     Sync
     WaitKey
     End
  EndIf
  
; Use this index to load the user32.dll
  LoadDll "user32.dll", User32
  
; "ShowCursor" is the DLL function we want to call.
; first we check if the function exists:
  If GetDllCallExist(user32,"ShowCursor"<> 1
     Print "Function name doesn't exist"
     Sync
     WaitKey
     End
  EndIf
  
; "ShowCursor" only expects one parameter: passing 1 will
; show the mouse, 0 will hide it
  Print "Now we hide the mouse"
  CallDll(user32,"ShowCursor",0; Hide the mouse cursor
  Print "Press a key to show the mouse"
  Sync
  WaitKey : WaitNoKey
  CallDll(user32,"ShowCursor",1; Show the mouse cursor
  Print "The mouse is back."
  Sync
  WaitKey
; Delete the DLL from memory
  DeleteDll user32
  



 
Related Info: GetdllStatus | LinkDll | LoadDll | LoadNewDll | NewAX :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com