By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,124 Members | 1,569 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,124 IT Pros & Developers. It's quick & easy.

WH_JOURNALPLAYBACK and WH_JOURNALRECORD hooks

P: n/a
WH_JOURNALPLAYBACK and WH_JOURNALRECORD

These hooks are difficult to get working in C#, but after much piecing
together of various code snippets from different language examples
across the Net, I have working code.

If anyone is interested in the code, please email me. It's not
perfect, but it does work.

I had a need to send keys and mouse events to an app that checked the
asynchkeystate (system level key state), which SendInput, SendKeys,
keybd_event, and mouse_event don't handle. The playback hook sets the
event state at a system level, not the thread level like these other
methods.

Some of the resources I used:

1) An almost complete JournalPlayback example, in Delphi. This
doesn't have the scancode shifted into the high byte of paramL, which
is an error that will affect some apps, but will work for most apps.
http://safariexamples.informit.com/0.../chapter13.pdf

2) C# examples, see the hooks section near the bottom.
http://www.codeproject.com/dll/

3) MSDN -- C# class, wrapper for hooks and tech doc.
http://msdn.microsoft.com/msdnmag/is...0/cuttingedge/
http://msdn.microsoft.com/library/de...AboutHooks.asp
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.