I have an array initialized in C# code; Then I am going to pass it to C++ dll in which each single entry of the array will be re-assigned with new value. Then the array with be returned back to C# with the new value. I am wondering
- what is the best way to pass the array from C# to C++? (Data structure of this array in C#)
- What is the best way to return the array from C++? (Data structure of this array in C++)
My code is not working:
In C#
private static double[] _statsArray = new double[4];
GetImageStats( ref _statsArray);
In C++ dll:
DllExportImageStatistics GetImageStats( double (&pSignalArray)[4])
Thanks for any suggestions; A couple of lines of code will help a lot.