public Array GetValues(string variable)
        {
            double[] retval = new double[1] {
                0.0
            };
            IntPtr bufptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(double)));

            DimrDllNative.get_var(variable, ref bufptr);
            Marshal.Copy(bufptr, retval, 0, 1);
            return(retval);
        }
 public void SetValues(string variable, Array values)
 {
     double[] retval = values as double[];
     if (retval == null)
     {
         throw new ArgumentNullException("Argument type is not double");
     }
     else
     {
         DimrDllNative.set_var(variable, retval);
     }
 }
        public int Initialize(string path)
        {
            string envPath = Environment.GetEnvironmentVariable("path", EnvironmentVariableTarget.Machine);

            envPath = @"c:\code\oss\bin\win64\flow1d2d\bin;c:\code\oss\bin\win64\RTCTools\bin;" + envPath;
            Environment.SetEnvironmentVariable("path", envPath);

            string filepath = "";

            try
            {
                filepath = Path.GetFullPath(path);
            }
            catch (ArgumentException e)
            {
                Console.WriteLine(e.Message);
            }

            DimrDllNative.initialize(filepath);
            return(0);
        }
 public int Finish()
 {
     DimrDllNative.finalize();
     return(0);
 }
 public void Update(double dt = -1)
 {
     DimrDllNative.update(dt);
 }