C里面的函数圆形是这样的
int  WINAPI AdvSubmitShortMsg(ULONG* upSM_ID, int* npError);在C#里面要如何定义

解决方案 »

  1.   

    到msdn中查c#中dllimport属性的用法
      

  2.   

    [DllImport("XXXX.dll", CharSet=CharSet.Auto)]
    private unsafe static extern int AdvSubmitShortMsg(UInt64* upSM_ID, Int32* npError);
      

  3.   

    to Vigorcsdn(混分来滴~) 
    指针只能用于不安全的上下文 如果按照你的来做
      

  4.   

    [DllImport("xxx.dll")]
    static extern int AdvSubmitShortMsg(ref uint upSM_ID, ref int npError);
      

  5.   

    C里面long和int都是32位的,在32位主机上
      

  6.   

    可以像速马的,用ref传引用进去,不过注意先要给参数赋值
      

  7.   

    [DllImport("xxx.dll")]
    static extern int AdvSubmitShortMsg(ref uint upSM_ID, ref int npError);
    之后如何引用啊