GetDllCallExist
Status = GetDllCallExist(DLLNumber, FunctionName$)
 
Parameters:

    DLLNumber = The DLL number
    FunctionName$ = The function name you wish to query
Returns:

    Status = This flag holds 1 if the function name exists, otherwise 0
 

      The GetDllCallExist function returns True (1) if a function name your query is present in the DLL. When you deploy your own DLLs with your game or application, you can use this function to prevent crashes in case the DLL is missing or corrupted even.


Status

      0 = The function doesn't exist in the DLL
      1 = The function exists in the DLL




FACTS


      * Function names in DLL are case sensitive and can also be decorated, which just means those names have some extra suffixes appended to them by the compiler that created them.





Mini Tutorial:


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

  
; Ask PlayBASIC for a currently Free DLL index.
  User32 = GetFreeDll()
  
; Use this index to load the user32.dll
  LoadDll "user32.dll", User32
  
  
; Check if function "ShowCursor" exists in this DLL
  If GetDllCallExist(user32,"ShowCursor"= 1
     Print "Found Function 'ShowCursor' in this dll"
     
  Else
     Print "SOrry this function doesn't exist in this dll"
  EndIf
  
  Sync
  WaitKey
  
; Delete the DLL from memory
  DeleteDll user32
  
  
  


This code would output

  
  Found Function 'ShowCursor' in this dll
  
  

 
Related Info: CallDll | CallDll# | CallDll$ | FunctionExist | GetDLLExist | LinkDll | LoadDLL :
 


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