有一段Delphi写的代码,最后返回的是char[]类型,长度是3,当我在C#中声明:
DllImport(@"D:\test\cssTest.dll", CharSet = CharSet.Ansi, EntryPoint = "GetChart5", CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.LPArray, SizeConst = 3)]
public static extern char[] GetChart4();然后调用该方法时,出现{"无法封送处理“return value”:
 无效的托管/非托管类型组合。"} System.Exception {System.Runtime.InteropServices.MarshalDirectiveException}
请教各位朋友如何解决?