public void Dispose() { if (keyBoardHandle != IntPtr.Zero && WindowsHookHelper.UnhookWindowsHookEx(keyBoardHandle)) { keyBoardHandle = IntPtr.Zero; } }
protected virtual void Dispose(bool disposing) { if (!disposed) { if (mouseHandle != IntPtr.Zero) { WindowsHookHelper.UnhookWindowsHookEx(mouseHandle); } disposed = true; } }