[INCLUDE]
CallFunction

[CODE]
Public Function CallFunction_Indirect(ByVal DllHandle As Long, ByVal FunctionName As Variant, ParamArray FunctionParams()) As Long
  Dim xLong1 As Long
  Dim xChar1 As String

  ReDim CallFunction_tmpParam(UBound(FunctionParams()) + 1&)
  For xLong1 = 0& To UBound(FunctionParams())
    CallFunction_tmpParam(xLong1) = FunctionParams(xLong1)
    Next
    
  If VarType(FunctionName) = vbString Then
    xChar1 = FunctionName
    Else
    xChar1 = FunctionName = "#" + CStr(Val(FunctionName))
    End If
  xLong1 = GetProcAddress(DllHandle, xChar1)
  If Not xLong1 = 0& Then
    CallFunction_Indirect = CallFunction_Real(xLong1)
#If InIDE Then
    Else
    Debug.Print "Cannot CallFunction_Indirect, function '" + xChar1 + "' not found"
#End If
    End If
  End Function
