internal override int Subscribe(int hookId, HookCallback hookCallback)
        {
            int hookHandle = HookNativeMethods.SetWindowsHookEx(
                hookId,
                hookCallback,
                IntPtr.Zero,
                ThreadNativeMethods.GetCurrentThreadId());

            if (hookHandle == 0)
            {
                ThrowLastUnmanagedErrorAsException();
            }

            return(hookHandle);
        }
        internal override int Subscribe(int hookId, HookCallback hookCallback)
        {
            int hookHandle = HookNativeMethods.SetWindowsHookEx(
                hookId,
                hookCallback,
                Process.GetCurrentProcess().MainModule.BaseAddress,
                0);

            if (hookHandle == 0)
            {
                ThrowLastUnmanagedErrorAsException();
            }

            return(hookHandle);
        }