GetFreeDll
DLLIndex = GetFreeDll()
 
Parameters: NONE
Returns:

    DLLIndex = The index value of a DLL that is not in use
 

      The GetFreeDll function returns the index of a DLL that is currently NOT in use.

      This is particularly useful when you wish to dynamically request and use DLLs as needed. This takes the burdon of managing what DLL indexes are currently free or in use from the programmers shoulders, and hides it away inside PlayBASIC. You can also use the LoadNewDll() function which will request a free DLL Index and load the dll into that position if available.




FACTS


     * You can only use GetFreeDll() with 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 DLL Index that is currently free for use.
  User32 = GetFreeDll()
  
; Use this index to load the user32.dll
  LoadDll "user32.dll", User32
  
; display the status of the loaded dll (
  Print GetDllStatus(user32)
  
  Sync
  WaitKey
  
; Delete the DLL from memory
  DeleteDll user32
  




This example would output.

  
  1
  




 
Related Info: DeleteDll | GetDLLExist | GetDllStatus | LoadDll :
 


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