日期:2014-05-17 浏览次数:21064 次
extern "C" __declspec(dllexport) BOOL Initdata(double* d_Conc, double* d_RLU,double d_Cal1RLU, double d_Cal2RLU,double d_Cal1Conc, double d_Cal2Conc, int nLen,int FitMethod);
double[] arrConc = new double[] { 0,4,16, 32,64,128 }; double[] arrRlu = new double[] { 8487,36329,159167, 315859,654285,1190543 }; double Cal1Rlu = 36330; double Cal1Conc = 4; double Cal2Rlu = 654285; double Cal2Conc = 64; int len = 6; int fitWay = 1; //初始化无法获取到正确的 bool rt = Initdata(ref arrConc[0], ref arrRlu[0], Cal1Rlu, Cal1Conc, Cal2Rlu, Cal2Conc, len, fitWay); [DllImport("Cal_datadll.dll")] public static extern bool Initdata(ref double dConc, ref double dRlu, double Cal1Rlu, double Cal1Conc, double Cal2Rlu, double Cal2Conc, int len, int fitWay); /************************/ [DllImport("Cal_datadll.dll")] public static extern bool Initdata(ref double[] dConc, ref double[] dRlu, double Cal1Rlu, double Cal1Conc, double Cal2Rlu, double Cal2Conc, int len, int fitWay); bool rt = Initdata(ref arrConc, ref arrRlu, Cal1Rlu, Cal1Conc, Cal2Rlu, Cal2Conc, len, fitWay); //也不行.