Example #1
0
        /// <summary>
        /// Sends clearlog message to service
        /// </summary>
        public static void ClearLog()
        {
            IntPtr  hwnd = SystemCalls.FindWindow(IntPtr.Zero, ServiceName);
            Message msg  = Message.Create(hwnd, WM_CLEAR_LOG, (IntPtr)0, (IntPtr)0);

            MessageWindow.SendMessage(ref msg);
        }
Example #2
0
        /// <summary>
        /// Sends message to the message window and return imidiately
        /// </summary>
        /// <param name="windowName">Name of the window</param>
        /// <param name="message">Windows message</param>
        /// <param name="Wparam">W parametr</param>
        /// <param name="Lparam">L parametr</param>
        public static void PostMessage(string windowName, int message, int Wparam, int Lparam)
        {
            IntPtr  hwnd = SystemCalls.FindWindow(IntPtr.Zero, windowName);
            Message msg  = Message.Create(hwnd, message, (IntPtr)Wparam, (IntPtr)Lparam);

            MessageWindow.PostMessage(ref msg);
        }
Example #3
0
        /// <summary>
        /// Sends quit message to service
        /// </summary>
        public static void StopService()
        {
            IntPtr  hwnd = SystemCalls.FindWindow(IntPtr.Zero, ServiceName);
            Message msg  = Message.Create(hwnd, WM_QUIT_SERVICE, (IntPtr)0, (IntPtr)0);

            MessageWindow.SendMessage(ref msg);
        }