110,545
社区成员
发帖
与我相关
我的任务
分享
[DllImport("xxx.dll", EntryPoint = "RegRead")]
public static extern byte RegRead(IntPtr d);
使用:
IntPtr ptr=new IntPtr();
byte len=RegRead(ptr);
byte[] bytes = new byte[size];
Marshal.Copy(ptr, bytes, 0, size);
byte[] byteSb = System.Text.Encoding.UTF8.GetBytes(d.ToString());