public GlobalHookCallback(HookType type, Func <IntPtr, IntPtr, bool> callback) { Callback = callback ?? throw new NullReferenceException(nameof(callback)); Procedure = ProcedureMethod; Hook = HookManager.GlobalHook(type, Procedure); }
public void Dispose() { GC.SuppressFinalize(this); HookManager.WindowUnhook(HWnd, Procedure); }