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

Hook handler procedure. Caled when hook event occures

Namespace: Tools.API.Hooks
Assembly: Tools.Win (in Tools.Win.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
protected abstract IntPtr HookProc(
	int nCode,
	IntPtr wParam,
	IntPtr lParam
)
Visual Basic
Protected MustOverride Function HookProc ( _
	nCode As Integer, _
	wParam As IntPtr, _
	lParam As IntPtr _
) As IntPtr
Visual C++
protected:
virtual IntPtr HookProc(
	int nCode, 
	IntPtr wParam, 
	IntPtr lParam
) abstract
F#
abstract HookProc : 
        nCode:int * 
        wParam:IntPtr * 
        lParam:IntPtr -> IntPtr 
JScript
protected abstract function HookProc(
	nCode : int, 
	wParam : IntPtr, 
	lParam : IntPtr
) : IntPtr

Parameters

nCode
Type: System..::..Int32
Specifies a code the hook procedure uses to determine how to process the message. If nCode is less than zero, the hook procedure must pass the message to the CallNextHookEx function without further processing and should return the value returned by CallNextHookEx.
wParam
Type: System..::..IntPtr
Meaning depends on type of hook
lParam
Type: System..::..IntPtr
Meaning depeds on type of hook

Return Value

If the hook procedure did not process the message, it is highly recomended that you call CallNextHook(Int32, IntPtr, IntPtr) and return the value it returns; otherwise, other applications that have installed same hooks will not receive hook notifications and may behave incorrectly as a result. If the hook procedure processed the message, it may return a nonzero value to prevent the system from passing the message to the rest of the hook chain or the target window procedure.

Remarks

Base class never calls this method when nCode is negative.

See Also