public static void SendWindowsStringMessage(int hWnd, int wParam, string msg)
 {
     if (hWnd <= 0) return;
     byte[] sarr = Encoding.Default.GetBytes(msg);
     int len = sarr.Length;
     var cds = new CopyDataStruct {DwData = (IntPtr) 100, LpData = msg, CbData = len + 1};
     SendMessage(hWnd, WM_COPYDATA, wParam, ref cds);
 }
Example #2
0
 public static extern int PostMessage(int hWnd, int msg, int wParam, ref CopyDataStruct lParam);
Example #3
0
 private static extern int SendMessage(int hWnd, int msg, int wParam, ref CopyDataStruct lParam);
Example #4
0
 private static extern int SendMessage(int hWnd, int msg, int wParam, ref CopyDataStruct lParam);