[This is preliminary documentation and is subject to change.]

The LowLevelMouseHook type exposes the following members.

Constructors

  NameDescription
Public methodLowLevelMouseHook()()()()
Default CTor
Public methodLowLevelMouseHook(Boolean)
CTor with possibility of immediate hook activation

Methods

  NameDescription
Protected methodCallNextHook
The CallNextHookEx function passes the hook information to the next hook procedure in the current hook chain. A hook procedure can call this function either before or after processing the hook information.
(Inherited from Win32Hook.)
Public methodDispose()()()()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from Win32Hook.)
Protected methodDispose(Boolean)
Implements Dispose()()()()
(Inherited from Win32Hook.)
Protected methodGetModuleHandle
Gets module handle pased to hMod parameter of SetWindowsHookEx Win32 API function
(Overrides Win32Hook..::..GetModuleHandle()()()().)
Protected methodHookProc

The LowLevelMouseProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function. The system call this function every time a new mouse input event is about to be posted into a thread input queue. The mouse input can come from the local mouse driver or from calls to the mouse_event function. If the input comes from a call to mouse_event, the input was "injected". However, the WH_MOUSE_LL hook is not injected into another process. Instead, the context switches back to the process that installed the hook and it is called in its original context. Then the context switches back to the application that generated the event.

The HOOKPROC type defines a pointer to this callback function. LowLevelMouseProc is a placeholder for the application-defined or library-defined function name.

(Overrides Win32Hook..::..HookProc(Int32, IntPtr, IntPtr).)
Protected methodOnButtonEvent
Called when mouse button status changes. Raises the ButtonEvent event.
Protected methodOnMouseMove
Called when mouse moves. Raises the MouseMove event.
Protected methodOnWheel
Called when mouse wheel rotates. Raises the Wheel event.
Public methodRegisterAsyncHook
Registers a low-level keyboard hook on curent thread. The thread will be exited when hook is unregistered.
(Inherited from Win32Hook.)
Public methodRegisterHook
Registers a low-level keyboard hook, so keyboard events are obtained by this class.
(Inherited from Win32Hook.)
Public methodUnregisterHook
Unregisters registered hook for this instance
(Inherited from Win32Hook.)

Properties

  NameDescription
Protected propertyHandledHookType
If overriden in derived class gets type of hook represented by derived class
(Overrides Win32Hook..::..HandledHookType.)
Protected propertyHookHandle
Gets handle of current hook if it is registered
(Inherited from Win32Hook.)
Public propertyIsAsync
Gets value indicating if hook events occur on different thread than hook was registered.
(Inherited from Win32Hook.)
Public propertyIsDisposed
Gets value indicating if this instance was already disposed
(Inherited from Win32Hook.)
Public propertyRegistered
Gets value indicating if hook is registered for this instance
(Inherited from Win32Hook.)

Events

  NameDescription
Public eventButtonEvent
Raised when status of any mouse button changes
Public eventDisposed
Raised when object is disposed
(Inherited from Win32Hook.)
Public eventMouseMove
Raised when mouse moves
Public eventWheel
Raised when mouse wheel rotates.

See Also