class A { public: A(); ~A() int C++DllMethod(int*); };
class A_Wrap { A_Wrap(); ~A_Wrap(); int CLRDllMethod(int*); };
int[] MyArray = { 10, 10, 10 }; int* IntVal = null; fixed (int* ii = MyArray) IntVal = ii; A_Wrap Wrapper = new A_Wrap(); Wrapper.CLRDllMethod(IntVal);
int[] MyArray = new int[3];
fixed (int* pointer = MyArray) { A_Wrap Wrapper = new A_Wrap(); Wrapper.CLRDllMethod(pointer); //all stuff with the array }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)