C++ 头文件:typedef void * A;typedef void * B;        B __stdcall a(LPCSTR s, unsigned long n);        void
        __stdcall b(B b);        A__stdcall query(B b, LPCSTR s);        bool
        __stdcall c(B);        unsigned long
        __stdcall d(A, unsigned char i);
C#中该如何调用?????????????

解决方案 »

  1.   


     [DllImport("DllName.dll")]
            public static extern int a(string s,uint n);
            [DllImport("DllName.dll")]
            public static extern void b(IntPtr b);
            [DllImport("DllName.dll")]
            public static extern IntPtr query(IntPtr b, string s);
            [DllImport("DllName.dll")]
            public static extern bool c(IntPtr b);
            [DllImport("DllName.dll")]
            public static extern uint d(IntPtr a, byte i); 
      

  2.   

    为什么public static extern int a(string s,uint n); 要用int啊??
      

  3.   

    int是返回值的类型……为什么不可以..
      

  4.   

    不是int 。。  还用void 就可以