动态库中的函数C语言申明方式是下面这样的int func1( int , char **);std::string  func2( int );在 C#里该定义什么样的格式啊,谢谢!

解决方案 »

  1.   

    [DllImport("abcdefg.dll")]
    public static extern int func1(int a,string[] b);[DllImport("abcdefg.dll")]
    public static extern string func2(int a);
      

  2.   

    [DllImport("abcdefg.dll")]
    public static extern int func1(int a,string[] b);[DllImport("abcdefg.dll")]
    public static extern string func2(int a);
      

  3.   

    [DllImport("abcdefg.dll")]
    public static extern int func1(int a,string[] b);[DllImport("abcdefg.dll")]
    public static extern string func2(int a);
      

  4.   

    试试这个:http://topic.csdn.net/t/20031211/12/2552240.html
      

  5.   

    第一个如楼上
    或者用ref string,看具体需求。
    第二个用不了,写个C++/CLI吧