Hi,
I'm trying to call my c++ functions in JSL. And I realize that I need to use the functions: "Load DLL()" and "Declare Function()". It seems to me that "Declare Function()" can only allow me to specify variables that are DOUBLE, INT, STRING? I also see the options like "Struct" and "ObjPtr", but I'm not sure how to use them.
If my C++ functions have matrix input and output, would I be able to import them into jmp?
P.S. the following code works for a function that has 'double' type of input.
If( Host is( "Windows" ),
dll =
Load DLL(
If(
File Exists(
"MYPATH/MathLibrary.dll"
),
"MYPATH/MathLibrary.dll",
Throw()
)
);
dll <<
DeclareFunction(
"TimesTwo",
Convention( STDCALL ),
Alias( "test_x2" ),
Arg( Double, "x" ),
Returns( Double )
);
result = dll << TimesTwo(8.8);
Show( result );
dll << Show Functions;
);