111,094
社区成员




uint index = ...; //uint
uint length = 1024; //uint
byte[] buffer = new byte[length];
CH375ReadData(index, buffer, ref length);
public static extern bool CH375ReadData(uint iIndex, System.IntPtr oBuffer, ref uint ioLength) ;
public static extern bool CH375WriteData(uint iIndex, System.IntPtr iBuffer, ref uint ioLength) ;
[DllImport("CH375DLL.DLL", EntryPoint = "CH375ReadData", ExactSpelling = false, SetLastError = true)]
public static extern bool CH375ReadData(ulong iIndex, byte[] oBuffer, ref ulong ioLength);//读单片机缓存
[DllImport("CH375DLL.DLL", EntryPoint = "CH375WriteData", ExactSpelling = false, SetLastError = true)]
public static extern bool CH375WriteData(ulong iIndex, byte[] iBuffer, ref ulong ioLength); //写单片机缓存
string msg = "hello world";
byte[] buffer = Encoding.Default.GetBytes(msg);