Tony Rong

Tony Rong

  • NA
  • 1
  • 2.1k

About MATLAB. NET c# mixed programming problems that occur in

Aug 24 2012 5:17 AM
I just wont say that it makes me mad.
My computer is Windows7 64-bit systems, MATLAB version is 1.0.0.1(2008a).
I use MATLAB to compile a "DLL" file, and VS2008 call this "DLL".
The problem code is:
----------------------
.
.
.
    MSFM_MATLAB_64class matlab = new MSFM_MATLAB_64class();//this is the problem code
                    Dictionary<double[], Dictionary<string, object[]>> result = new Dictionary<double[], Dictionary<string, object[]>>();
                    this._pro.SetProgressText("Preparing algae samples temporary files……");
                    DataTable dtMuLu = new DataTable();
                    dtMuLu.Columns.Add("Algae species");
                    dtMuLu.Columns.Add("Outbreak of value");
                    foreach (KeyValuePair<string, string> item in this._lib_yangben)
                    {
                        this._dio.OutPutYangBenFile(item.Key, item.Value, this._yangben);
                        dtMuLu.Rows.Add(item.Key, this._lib_baofa[item.Key]);
                    }
.
.
Exception: "MSFM_MATLAB_64.MSFM_MATLAB_64class" the type initializer throws an exception.

"MATLAB Compiler Runtime" has been properly installed.And environment variables are set correctly.
When I run this program under a 32-bit system, it has no exceptions.I am very surprised!

Can you help me?Plaese!