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"
 

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

Similar Threads

hooking keyboard input twice 0
Hooking IO of another process ? 6
Global Hook for Window Painting 2
Hooks with C# 2
local keyboard hook 2
Window Hooks 1
C# Global Hook Samples? 0
Keyboard Hook, Hotkeys 2

Back
Top