Hi all,
I've successfully managed to call a dll in VB.NET but can't for the life of me figure out how to do it in Delphi. The VB code is:
Function foo(ByVal inputArgument As VariantType) As VariantType
Dim myClass As test5.test5class
Dim answer = New VariantType
Dim noArguments = New VariantType
noArguments = 1
On Error GoTo Handle_Error
myClass = New test5.test5class
Call myClass.TestFunction(noArguments, answer, inputArgument)
foo = answer
Exit Function
Handle_Error:
foo = Err.Description
End Function
The dll is created in Matlab. The function is a very simple test:
Function answer = TestFunction(inputArgument)
TestFunction = inputArgument * inputArgument;
However, it seems that Matlab converts the function to:
function(number of arguments to output, the answer, input 1, input 2 ... input n)
I'm lost, please help me...
I've successfully managed to call a dll in VB.NET but can't for the life of me figure out how to do it in Delphi. The VB code is:
Function foo(ByVal inputArgument As VariantType) As VariantType
Dim myClass As test5.test5class
Dim answer = New VariantType
Dim noArguments = New VariantType
noArguments = 1
On Error GoTo Handle_Error
myClass = New test5.test5class
Call myClass.TestFunction(noArguments, answer, inputArgument)
foo = answer
Exit Function
Handle_Error:
foo = Err.Description
End Function
The dll is created in Matlab. The function is a very simple test:
Function answer = TestFunction(inputArgument)
TestFunction = inputArgument * inputArgument;
However, it seems that Matlab converts the function to:
function(number of arguments to output, the answer, input 1, input 2 ... input n)
I'm lost, please help me...