Caveats

This hook, in effect, forces every thread to receive messages from a single queue. This is how the 16-bit Windows operating systems works. Therefore, the operating system cannot take advantage of multitasking. A problem that occurs in all 16-bit Windows operating systems can now occur in 32-bit Windows operating systems: a single application can hang all applications, even the desktop. This is the reason for having the CTRL-ESC and CTRL-ALT-DEL key combinations built into the system to remove any journal hooks.

Because this hook serializes all input to all windows, there is a large performance penalty. You should use hooks such as this cautiously. When you do use such hooks, you should install them for as little time as possible. Windows cannot take advantage of its multitasking power when this hook is installed.

When you use this hook, you might encounter a problem with the mouse wheel. This problem is recorded under ID: Q186942PRB: WM_MOUSEWHEEL Delta Values Not Supported by Journal Hooks, in the Microsoft Developer Network (MSDN). In short, this hook does not record the wheel delta value. Therefore, when the messages are played back through the WH_JOURNALPLAYBACK hook, the mouse wheel rotations are not played back. This is because the wheel delta value is placed in the wParam member of the WM_MOUSEWHEEL message, which this hook does not record. The rest of the WM_MOUSEWHEEL message, however, is recorded and played back.

This hook cannot record the CTRL-ESC and CTRL-ALT-DEL ...

Get Subclassing and Hooking with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.