예제 #1
0
        public static int Send(int hWnd, int wParam, string msg)
        {
            int result = 0;

            byte[]         sarr = System.Text.Encoding.Default.GetBytes(msg);
            int            len  = sarr.Length;
            COPYDATASTRUCT cds;

            cds.dwData = (IntPtr)100;
            cds.lpData = msg;
            cds.cbData = len + 1;
            result     = WindowsNTMethods.SendMessage(hWnd, WM_COPYDATA, wParam, ref cds);

            return(result);
        }
예제 #2
0
        public static int Send(int hWnd, int Msg, int wParam, int lParam)
        {
            int result = WindowsNTMethods.SendMessage(hWnd, Msg, wParam, lParam);

            return(result);
        }