函数原型是 void abc(char* a);小弟想在c#里调用,请问c#的调用函数该怎么写,不知道以下写法行不行,还是其他的什么写法。abc(ref char[] a);abc(ref string a);char a = 'a';
abc(ref &a);

解决方案 »

  1.   

    调用时老是出现:
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.不知道为什么
      

  2.   

    我就是想知道char*在c#里怎么表示
      

  3.   

    lz:你是写的普通dll吧,如果是,用abc(ref string a);你做成了真正的com组件,直接添加引用到项目(普通dll不能这样做),
    然后在工程里直接使用就行了。
      

  4.   

    string有一个ToCharArray吧,这个是CHAR[]类型的,可以转成CHAR*吧