如何将C#中的byte 型数组传递给C++的api函数?
下面的代码该咋整?才能消除错误2啊byte[] buf = new byte[n];//#中的byte 型数组
  [System.Runtime.InteropServices.DllImport("User32.dll", EntryPoint = "SendMessage")]
        private static extern int SendMessage(
         IntPtr hWnd, // handle to destination window
         int Msg, // message uint
         IntPtr wParam, // first message parameter
         IntPtr lParam // second message parameter
        );
 SendMessage(this.Handle, WM.WM_COM_TO_DATA_FLOW, buf, new IntPtr(n));//C++的api函数
错误 2 参数“3”: 无法从“byte[]”转换为“System.IntPtr” E:\CSharpWork\SXTools\SXTools\Form1.cs 251