Possible cause for years old .NET DLL which uses imports from mclmcrrt711.dll and a second Matlab Compiler produced dll to suddenly start producing bad string data?

3 views (last 30 days)
The subject C# DLL has not been touched in several years. Its functional purpose is simply to write a .mat file of data (nested cell structure) and also to load the .mat file to produce a Matlab figure and save it to a .png file.
The subject DLL imports from two dlls (which also have not been touched for several years) * mclmcrrt711.dll (imports below)
#region Matlab MCR Imports
#region Data Functions
[DllImport("mclmcrrt711.dll")]
internal static extern IntPtr mxCreateCellMatrix_730_proxy([In] Int32 mxRows, [In]Int32 mxCols);
[DllImport("mclmcrrt711.dll", CharSet = CharSet.Ansi)]
internal static extern IntPtr mxCreateString_proxy([In]Char[] CharStr);
[DllImport("mclmcrrt711.dll")]
internal static extern IntPtr mxCreateDoubleScalar_proxy([In]Double value);
[DllImport("mclmcrrt711.dll")]
internal static extern IntPtr mxGetCell_730_proxy([In]IntPtr mxArray, [In]Int32 mwIndex);
[DllImport("mclmcrrt711.dll")]
internal static extern void mxSetCell_730_proxy([In]IntPtr mxArray_Target, [In]Int32 mwIndex, [In]IntPtr mxArray_Value);
[DllImport("mclmcrrt711.dll")]
internal static extern Int32 mxGetN_proxy([In]IntPtr mxArray);
[DllImport("mclmcrrt711.dll")]
internal static extern Int32 mxGetDimensions_730_proxy([In]IntPtr mxArray);
[DllImport("mclmcrrt711.dll")]
internal static extern Int32 mxGetNumberOfElements_proxy([In]IntPtr mxArray);
[DllImport("mclmcrrt711.dll", CharSet = CharSet.Ansi)]
internal static extern Int32 mxGetString_730_proxy([In]IntPtr mxArray, [Out]StringBuilder str, [In]Int32 strlen);
#endregion //Data Functions
#region Housekeeping Functions
[DllImport("mclmcrrt711.dll")]
internal static extern void mxDestroyArray_proxy([In]IntPtr mxArray);
[DllImport("mclmcrrt711.dll")]
internal static extern Boolean mclInitializeApplication_proxy(String options, Int32 count);
[DllImport("mclmcrrt711.dll")]
internal static extern void mclTerminateApplication_proxy();
#endregion //Housekeeping Functions
#endregion //Matlab MCR Imports
* ThermalModel.dll (a Matlab Compiler produced dll, import below)
#region Thermal Model Imports
[DllImport("ThermalModel.dll")]
private static extern Boolean mlxPlotModel(
[In]Int32 nArgOut, ref IntPtr plhs, [In]Int32 nArgIn, ref IntPtr prhs);
[DllImport("ThermalModel.dll")]
private static extern Boolean mlxSave_input_to_disk(
[In]Int32 nArgOut, ref IntPtr plhs, [In]Int32 nArgIn, ref IntPtr prhs);
[DllImport("ThermalModel.dll")]
private static extern Boolean mlxLoad_saved_input(
[In]Int32 nArgOut, ref IntPtr plhs, [In]Int32 nArgIn, ref IntPtr prhs);
[DllImport("ThermalModel.dll")]
private static extern Boolean ThermalModelInitialize();
[DllImport("ThermalModel.dll")]
private static extern void ThermalModelTerminate();
#endregion //Thermal Model Imports
All of a sudden, all string data contained in the cell structure is corrupted with extraneous characters at the end of the strings.
I am looking for possible causes and if anyone else has run into a similar issue. My suspicion is that something contained in a System Update pushed on network computers from Information Technology is to blame. They typically only push security updates to our computers (I am running the Windows 7 Enterprise OS). This issue has appeared on multiple computers.
Any ideas about a possible cause or how to determine the cause will be much appreciated.
Best regards, Pius

Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!