Esempio n. 1
0
 public static void StopHook()
 {
     NativeUIOHook.hook_stop();
     // wait for shutdown event
     initializing.Wait();
     // release semaphore. the hook is cleared
     initializing.Release();
 }
Esempio n. 2
0
        public static void StartHook()
        {
            // take the semaphore. it will be released when the EVENT_TYPE.EVENT_HOOK_ENABLED event is received
            initializing.Wait();
            Thread thread = new Thread(() =>
            {
                NativeUIOHook.hook_set_dispatch_proc(Dispatch);
                NativeUIOHook.hook_run();
                // thread is now blocked until hook_stop() is called
            })
            {
                Name = "UIOHook Dispatch Thread"
            };

            thread.Start();
            initializing.Wait();
            // finished initializing
        }
Esempio n. 3
0
 public static void DisableDefaultLogFunc()
 {
     NativeUIOHook.hook_set_logger_proc(Handlelogger_t);
 }
Esempio n. 4
0
 public static void EnableDefaultLogFunc()
 {
     NativeUIOHook.hook_set_logger_proc(null);
 }