[INCLUDE]
CallFunction
LoadLibrary

[CODE]
#If (CallFunction_FlagA And &H100&) = &H100& Then
Public Function CallFunction_Full(ByVal DllFilename As String, ByVal FunctionName As String, ByVal IsStdCall As Boolean, ParamArray FunctionParams()) As Long
#Else
Public Function CallFunction_Full(ByVal DllFilename As String, ByVal FunctionName As String, ParamArray FunctionParams()) As Long
#End If
  Dim xLong1 As Long
  Dim xLong2 As Long
    
  ReDim sLongA1(UBound(FunctionParams()) + 1&)
  For xLong1 = 0& To UBound(FunctionParams())
    sLongA1(xLong1) = FunctionParams(xLong1)
    Next
    
  xLong1 = LoadLibrary(DllFilename)
  If Not xLong1 = 0& Then
    If Not VarType(FunctionName) = vbString Then FunctionName = "#" + CStr(Val(FunctionName))
    xLong2 = GetProcAddress(xLong1, CStr(FunctionName))
    If Not xLong2 = 0& Then
      #If (CallFunction_FlagA And &H100&) = &H100& Then
        CallFunction_Full = CallWindowProcAnsi(PrepareCode(xLong2, IsStdCall), 0, 0, 0, 0)
        #Else
        CallFunction_Full = CallWindowProcAnsi(PrepareCode(xLong2), 0, 0, 0, 0)
        #End If
      End If
    End If

  ReDim sLongA1(0&)
  ReDim sByteA1(0&)
  End Function
