If you need to implement a hook that does not follow the IGlobalHook interface (for example, if you are implementing IReactiveGlobalHook or IR3GlobalHook), you should extend BasicGlobalHookBase instead of GlobalHookBase.
BasicGlobalHookBase is the root implementation for the SharpHook hierarchy. It provides the core logic for IBasicGlobalHook (which defines Run, RunAsync, Stop, IsRunning, and IsDisposed) and handles the non-trivial event-handling machinery.
By extending BasicGlobalHookBase, you gain access to HandleHookEvent, BeforeRun, AfterStop, and Dispose without having to implement the underlying provider logic yourself.
public sealed class StraightforwardGlobalHook : BasicGlobalHookBase
{
protected override void HandleHookEvent(ref UioHookEvent e) =>
this.HookEvent?.Invoke(this, e);
public event EventHandler<UioHookEvent>? HookEvent;
}