[DllImport("user32.dll")]
static extern int CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam,
IntPtr lParam);
// overload for use with LowLevelKeyboardProc
[DllImport("user32.dll")]
static extern int CallNextHookEx(IntPtr hhk, int nCode, WindowsMessages wParam, [In]KBDLLHOOKSTRUCT lParam);
// overload for use with LowLevelMouseProc
[DllImport("user32.dll")]
static extern int CallNextHookEx(IntPtr hhk, int nCode, WindowsMessages wParam, [In]MSLLHOOKSTRUCT lParam);
<DllImport("User32.dll", CharSet:=CharSet.Auto, CallingConvention:=CallingConvention.StdCall)> _
Shared Function CallNextHookEx _
(ByVal hhk As Integer, ByVal nCode As Integer, _
ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Integer
End Function
WindowsMessages,KBDLLHOOKSTRUCT,MSLLHOOKSTRUCT
hhk is ignored, so you can use IntPtr.Zero
Please add some!
Please add some!
The ManagedWindowsApi project (http://mwinapi.sourceforge.net) provides a Hook class and subclasses for Journal hooks, Message hooks and Low-Level hooks.
CallNextHookEx on MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/callnexthookex.asp