1.c++参数含有&,c#也需要用ref关键字。

  2.在c++中声明是char*,调用是char[];c#声明为Intptr,调用使用Marshal.AllocHGlobal(Size)为其赋值。记得释放分配的内存Marshal.FreeHGlobal(stringPointer);

     而在c#中获取这个值,使用Marshal.Copy(Intptr source.自定义类型 destination, sss, int copy起始位置, int 要copy的数目),destination即是。