解决方案 »

  1.   

    [DllImport("refprop.dll", EntryPoint = "THERM2dll", SetLastError = true)]
    public static extern void THERM2dll(ref double TK, ref double rho, double[] X, [In, Out] ref double PKPA, [Out] double e,
                   [Out] double h, [Out] double s)
      

  2.   

    都要加上 out 或者 ref 的。
      

  3.   

    我最近项目中的调用方法,调用成功
    [DllImport("Test_Dll.dll", EntryPoint = "函数名")]
                public static extern bool 函数名(参数);
      

  4.   

    如果是托管的,你可以用反射。
    如果不是托管的,你就用[DllImport]