CallDll#
Result# = CallDll#(DLLNumber, FunctionName$, [Param List])
 
Parameters:

    DLLNumber = The DLL number
    FunctionName$ = The name of the function you want to call from this DLL
    [Param List] = Specifies between 0 and 64 parameters that are passed to the function
Returns:

    Result# = Holds the return value of the DLL function
 

      CallDll# will call a function from within a DLL that returns a 32bit float value.




FACTS


      * It's important to understand that the Windows operating system expects floats to be returned on the system FPU (floating point unit) stack, which is a special part of your compouters CPU that handles float calculations. If you call a function expecting a float result and the fuinction doesn't return one, then this will more than likely crash your program. So it's very important to know what data types the function expects and input and what it returns.


      * Please read the calldll page for more general information about CallDLL operations



Mini Tutorial:


     In this sample we're calling a function AddFloats from a pretend DLL called "AddNumbers.dll". The function expects two floating pointer parameters and returns a float.

  
  
; Load the DLL into Mmemory
  ThisDLL=LoadNewDll("AddNumbers.dll")
  
; Call the add function and return a float from it which we print
  Print CallDll#(ThisDLL, "AddFloats",  123.6944.44)
  
; Show the screen and wait for a key press
  Sync
  WaitKey
  
  



 
Related Info: CallDll | CallDll$ | CallFunction | FunctionIndex | LinkDll | LoadDLL :
 


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