Good morning,
I am working on a project which use C# code, a C\CLI wrapper and C++ code. Actually, I have to call an managed function inside a C++ function.
My function in C++ has this prototype :
void TestArray(float** array1, int numRows, int numCols);
Inside this function I call a C# function which has this prototype :
public void TestArray(ref float[,] arrayTest, int numRows, int numCols);
I created in the C++ function TestArray a cli::array which contains the data of the array "array1" and after I passed to the C# function. See below the code :
cli::array<float,2>^ array1_test = gcnew cli::array<float,2>(numRows,numCols);
...
TestArray(array1_test, numRows, numCols );
But by using this way, I used lot of copy I guess and I would like to know if it is possible to use the address of the array (the one passed in argument by float**) and passed this one directly to the C# function.
Thank you in advance for any suggestions.