Problem with interface.
Jonathan Blanchard
BlanchardJ at ieee.org
Mon May 26 15:14:55 CEST 2008
I try to write an interface for a dynamically link routine in Scilab
5. The routine is meant to be invoked by using the short call syntax.
Here is a striped down example of my C code. When called Scilab 5
report an EXCEPTION_ACCESS_VIOLATION and the return value is simply
the name of the function.
Fore example this script :
a = call( 'test' );
a would be equal to "Test".
I tried different compiler with the same results.( GCC, LCC ). BTW I'm
on win XP SP2(32Bit).
int DLL_EXPORT Test( char* fname )
{
CheckRhs(1,1);
CheckLhs(1,1);
int m1, n1;
static int l1;
GetRhsVar( 1,STRING_DATATYPE, &m1, &n1, &l1);
m1 = 1;
n1 = 1;
CreateVar( 2, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &l1 );
*istk(l1) = 321654;
LhsVar(1) = 2;
PutLhsVar();
return 0;
}
--
Jonathan Blanchard
BlanchardJ at ieee.org
More information about the dev
mailing list