public static void StopHook() { NativeUIOHook.hook_stop(); // wait for shutdown event initializing.Wait(); // release semaphore. the hook is cleared initializing.Release(); }
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 }
public static void DisableDefaultLogFunc() { NativeUIOHook.hook_set_logger_proc(Handlelogger_t); }
public static void EnableDefaultLogFunc() { NativeUIOHook.hook_set_logger_proc(null); }