unsafe static bool Send(IntPtr hWnd, string message) { CopyDataStruct lParam = new CopyDataStruct(); lParam.Padding = IntPtr.Zero; lParam.Size = message.Length * 2; fixed (char *buffer = message) { lParam.Buffer = new IntPtr(buffer); return NativeMethods.SendMessage(hWnd, 0x4a, IntPtr.Zero, ref lParam) != IntPtr.Zero; } }
internal static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, ref CopyDataStruct lParam);