PC Review


Reply
 
 
=?Utf-8?B?YnJ1bm8=?=
Guest
Posts: n/a
 
      20th Jan 2006
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
 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      20th Jan 2006
>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

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Do I need a hook or something else? jmDesktop Microsoft VB .NET 0 23rd May 2007 08:15 PM
Help About the Hook steel Microsoft Dot NET Compact Framework 1 14th Aug 2006 05:00 PM
System-wide keyboard hook does not hook the console window? =?Utf-8?B?SGFrdQ==?= Microsoft Windows 2000 0 15th Aug 2005 11:03 PM
gdi hook? cs Microsoft C# .NET 0 20th Apr 2004 01:40 AM
Hook Omar Microsoft C# .NET 3 29th Nov 2003 09:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:21 PM.