string[] aryProgramList
你这个东西有问题吧

解决方案 »

  1.   

    正常的情况测试过是可以传的,就是空字符串出错,null的情况下也可以传的
      

  2.   

    根本没有到C里面去,
    就是这个声明,你随便返回一个100就可以了extern "C" __declspec(dllexport) int DeleteCTSImageByInspectionProgram(LPTSTR sRootFolder, LPTSTR sStartDate, LPTSTR sEndDate, LPTSTR* aryProgramList, int iCount)
    {
    return 100;
    }
      

  3.   

    我在API的都声明中添加[MarshalAs(UnmanagedType.SafeArray)],不报错了,但是传进去的值不对还是不可以用[DllImport("CTSImageOperation")]
    public static extern int DeleteCTSImageByInspectionProgram(string sRootFolder, 
    string sStartDate, string sEndDate, 
    [MarshalAs(UnmanagedType.SafeArray)] string[] aryProgramList,
    int iCount);