[Scilab-users] Not able to get the scilab variable value from VB.Net

hilife5 hi_life4 at yahoo.in
Mon Oct 14 10:34:50 CEST 2013


DLL is made with these function. Kindly correct the code where i am doing
error .

[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
        public unsafe static extern int getNamedScalarInteger32([In]IntPtr
_pvCtx, [In] String _pstName, [In,Out] Int32 _piData);

 [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
        public static extern api_Err createNamedScalarInteger32([In]IntPtr
pvApiCtx, [In]String _pstName,[In] int _iData);

These are two function that has been used to create and access scilab
valiable. 
 public unsafe int getNamedScalarInteger32(string name)
        {
            int data=0 ;
            System.IntPtr ptrEmpty = new System.IntPtr();
         int iret    = Scilab_cs_wrapper.getNamedScalarInteger32(ptrEmpty,
name, data);
            return data; 

        }

 public unsafe int createNamedScalarInteger32(string  varname, int iData)
        {
            System.IntPtr ptrEmpty = new System.IntPtr();
            Scilab_cs_wrapper.api_Err SciErr =
Scilab_cs_wrapper.createNamedScalarInteger32(ptrEmpty, varname, iData);
             return SciErr.iErr;
        }

When creating a variable from vb application , not able to access its value.
the code that i have tried is 


        obj1.SendScilabJob("x = 5;")
        obj1.SendScilabJob("y=x+1;")
        Dim out As Integer = obj1.getNamedScalarInteger32("y")





--
View this message in context: http://mailinglists.scilab.org/Not-able-to-get-the-scilab-variable-value-from-VB-Net-tp4027610.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list