Passing pointer to pointer of array of structure from C# to C++
问题 I want to pass pointer to pointer of an array of structure from C# to C++. With following code I only get the first element in c++, second and third element of the array is not passed. Why? Also, tried using StructureToPtr but didn't help. What I am doing wrong? C++ code struct structure { short ps; }; __declspec(dllexport)short Testmethod(structure** aa) { if (aa!= 0 && aa[0]->ps == 26 && aa[1]->ps == 27) { return 1; } return 0; } C# code [DllImport("Wrapper.dll", CallingConvention =