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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top