System message hook?

  • Thread starter Thread starter Eric Johannsen
  • Start date Start date
E

Eric Johannsen

Is it possible to write a system hook in C#? I have seen a few posts
claiming that it's not possible. The justification given is that the system
hook has to be in a relocatable DLL, and that this can not be accommodated
in .Net.

What I'm actually trying to do is figure out when a certain key is pressed
and inject a number of additional key events into the system event queue.

Thanks!

Eric
 
It's definately possible. Check out the following links.

http://support.microsoft.com/?kbid=318804
http://www.codeproject.com/csharp/GlobalSystemHook.asp
http://www.codeproject.com/csharp/NetWin32Hooks.asp

The code project links have complete samples you can look at. Post back if
you still have questions.



--
Jared Parsons [MSFT]
(e-mail address removed)
This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
 
Back
Top