Esempio n. 1
0
        static void Main()
        {
            Console.WriteLine("Application Started");


            Application.ApplicationExit += new EventHandler(OnApplicationExit);

            /*Installing Hooks*/
            Hooks.UnInstallHooks();
            Hooks.InstallHooks();

            /*Installing WindowEventHooks*/
            WindowEventHooks.UnInstallWindowEventHooks();
            WindowEventHooks.InstallWindowsEventHooks();
            Task movemnetTask = Task.Factory.StartNew(() =>
            {
                Hooks.OnMouseMovement += new MouseEventHandler(OnMouseMovement);
            });

            Task startProcessingMovedPoint = Task.Factory.StartNew(() =>
            {
                ProcessMovedEvents();
            });

            Hooks.OnMouseActivity += new MouseEventHandler(OnMouseLeftClick);
            //WinAPIs.InitUiTreeWalk();
            //c.StartClient();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
Esempio n. 2
0
        public static void OnApplicationExit(object sender, EventArgs e)
        {
            //c.ShutDownClient();
            WinAPIs.UnInitUiTreeWalk();
            Hooks.UnInstallHooks();
            //Hooks.UnInstallHooks();
            //foreach (var kp in Hooks.UnInstallResults)
            //{
            //    Console.WriteLine("Procedure is : " + kp.Key + " result is : " + kp.Value);
            //}

            WindowEventHooks.UnInstallWindowEventHooks();
            foreach (var kp in Hooks.UnInstallResults)
            {
                Console.WriteLine("Procedure is : " + kp.Key + " result is : " + kp.Value);
            }
        }