"tolisss" <no****@devdex.com> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...
hi
why the following works only for windows initiated from the current
thread
SetWindowsHookEx(HookType.WH_CBT, HookProc,IntPtr.Zero,0)
*** Sent via Developersdex http://www.developersdex.com ***
I assume HookProc is managed callback, so it's part of a managed assembly,
right?
Using managed callbacks, only WH_KEYBOARD_LL and WH_MOUSE_LL hooks can be
installed globally. All other hooks would requires the CLR (and the
HookProc's assembly) to be mapped in every process on the system, this is
not supported in .NET. Your only option is to implement your HookProc (and
preferably, also the registration/unregistration code too) in a native code
DLL (C/C++).
Willy.