CBT Hook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a VB.NET 2005 program, that hooks Kb and mouse inputs for any active
desktop application, I've just added a new CBT hook. After that every think
work fine, like before, BUT:
CBT filter is not actiated, even if SetWindowsHookEx returns a valid hHook
and UnhookWindowsHookEx returns False. Also in VS output window I get a
message saying "A first chance exception of type 'System.Exception' occurred
in cHOOK.dll" I suppose is related to my problem.
I've checked the code and every think seams to be correct. Can any body give
some suggestions?
Thanks.
Roman
 
I've checked the code and every think seams to be correct. Can any body give
some suggestions?

You can't implement global hooks in managed code (except the low-level
mouse and keyboard hooks which are special cases that don't require
injection of code in other processes). C is a better language for
that.


Mattias
 
Back
Top