Class SimpleGlobalHook
Represents an implementation of IGlobalHook which raises events on the same thread on which the hook itself runs.
Inherited Members
Namespace: SharpHook
Assembly: SharpHook.dll
Syntax
public sealed class SimpleGlobalHook : GlobalHookBase, IGlobalHook, IDisposable
Remarks
The event handlers should generally be fast and simple so that the thread can process all raised events. If you need to do a lot of processing in the event handlers then consider using another implementation, e.g. TaskPoolGlobalHook.
Constructors
| Improve this Doc View SourceSimpleGlobalHook()
Initializes a new instance of SimpleGlobalHook.
Declaration
public SimpleGlobalHook()
SimpleGlobalHook(Boolean)
Initializes a new instance of SimpleGlobalHook.
Declaration
public SimpleGlobalHook(bool runAsyncOnBackgroundThread)
Parameters
Type | Name | Description |
---|---|---|
Boolean | runAsyncOnBackgroundThread | true if RunAsync() should run the hook on a background thread. Otherwise, false. |
Methods
| Improve this Doc View SourceHandleHookEvent(ref UioHookEvent)
Handles the hook event.
Declaration
protected override void HandleHookEvent(ref UioHookEvent e)
Parameters
Type | Name | Description |
---|---|---|
UioHookEvent | e | The event to handle. |