Inheritance: Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid
Exemple #1
0
        private static void SendChar(ClientWindowHandle hWnd, char c)
        {
            int value  = (int)c;
            int lParam = 1 | ((NativeMethods.OemKeyScan(value) & 0xFF) << 16) | (0x3 << 30);

            NativeMethods.SendMessage(hWnd, WM_CHAR, value, lParam);
        }
Exemple #2
0
        /// <summary>
        /// Brings the Client window to the foreground.
        /// </summary>
        /// <returns>True if the Client is running, false if not.</returns>
        public static bool BringToTop()
        {
            ClientWindowHandle hWnd = Handle;

            if (!hWnd.IsInvalid)
            {
                NativeMethods.SetForegroundWindow(hWnd);

                return(true);
            }

            return(false);
        }
Exemple #3
0
        /// <summary>
        /// Sends a <see cref="String" /> of characters (<paramref name="text" />) to the Client.
        /// </summary>
        /// <returns>True if the Client is running, false if not.</returns>
        public static bool SendString(string text)
        {
            ClientWindowHandle hWnd = Handle;

            if (!hWnd.IsInvalid)
            {
                for (int i = 0; i < text.Length; ++i)
                {
                    SendChar(hWnd, text[i]);
                }

                return(true);
            }
            else
            {
                return(false);
            }
        }
 public static extern int CloseHandle(ClientWindowHandle handle);
Exemple #5
0
		public static extern int SendMessage(ClientWindowHandle hWnd, int wMsg, int wParam, int lParam);
 public static extern bool PostMessage(ClientWindowHandle hWnd, int wMsg, int wParam, int lParam);
 public static extern int IsWindow(ClientWindowHandle window);
 public static extern int SetForegroundWindow(ClientWindowHandle hWnd);
 public static extern int SendMessage(ClientWindowHandle hWnd, int wMsg, int wParam, int lParam);
Exemple #10
0
		public static extern bool PostMessage(ClientWindowHandle hWnd, int wMsg, int wParam, int lParam);
 public static extern int GetWindowThreadProcessId(ClientWindowHandle window, ref ClientProcessHandle processID);
Exemple #12
0
		public static extern int SetForegroundWindow(ClientWindowHandle hWnd);
 public static extern int CloseHandle(ClientWindowHandle handle);
Exemple #14
0
		public static extern int GetWindowThreadProcessId(ClientWindowHandle window, ref ClientProcessHandle processID);
Exemple #15
0
		public static extern int IsWindow(ClientWindowHandle window);
Exemple #16
0
        private static void SendChar(ClientWindowHandle hWnd, char c)
        {
            int value = c;
            int lParam = 1 | ((NativeMethods.OemKeyScan(value) & 0xFF) << 16) | (0x3 << 30);

            NativeMethods.PostMessage(hWnd, WM_CHAR, value, lParam);
        }
		public WindowProcessStream( ClientWindowHandle window )
		{
			m_Window = window;
			m_ProcessID = ClientProcessHandle.Invalid;
		}
 public WindowProcessStream(ClientWindowHandle window)
 {
     m_Window    = window;
     m_ProcessID = ClientProcessHandle.Invalid;
 }