Hi all
I have to use unmanaged COM from .Net environment. This component does
some calculations on a two dimensional array of data and returns
another two dimentional array of processed data.
I've added a reference to this COM. Then I've instantiated an object
of its type. Now I want to call a ProcessData method of this object.
ProcessData method in the original C++ expects float** type as a
parameter (which is a two dimentional array of floats). I've tryed to
do something like this:
int [,]arrRaw1={{2,2,2},{3,3,3}};
int [,]arrFiltered1;
IntPtr arrRaw;
IntPtr arrFiltered;
Marshal.StructureToPtr(arrRaw1,arrRaw,true);
obj.ProcessData(arrRaw,arrFiltered);
Marshal.PtrToStructure(arrFiltered,arrFiltered1);
It does not work.
How to pass multidimentional array to/from unmanaged code?
Thanks for your help,
Lisa.