byte[] bytes = new byte[iLen];
...
IntPtr p = Marshal.AllocHGlobal(iLen * sizeof(byte));
Marshal.Copy(bytes, 0, p, iLen);
byte[] kkk = new byte[iLen];
Marshal.Copy(p, kkk, 0, iLen);
int result = ImpDll.KAER_InputData(phHandle, p, (long)iLen);
Marshal.FreeHGlobal(p);
我现在就这样做的,但刚调试了,说我传的地址为0