Tech Support > Microsoft Windows > Development Resources > SetWindowsHookEx local WH_CALLWNDPROCRET not getting called
SetWindowsHookEx local WH_CALLWNDPROCRET not getting called
Posted by dcbrien@gmail.com on September 13th, 2006


I'm investigating using hooks for the first time. I've been successful
in installing system wide hooks for filtering messages, but I've had
some trouble with local hooks. I've created a DLL that has a function
to call SetWindowsHookEx and I call this function from another program
and pass the threadId of the thread I want to hook into (I find this by
enumerating the windows and then using GetWindowThreadProcessId when I
find the one I want.) This DLL also has the callback function. As a
test I started up the calculator program and tried to install the
various hooks on it. So far, all I can get to work are WH_KEYBOARD and
WH_MOUSE. The callback is not called for the other hooks. If I
install a system wide hook, the calculator will call the callback
function so I know it can process these messages. Any ideas on why
this could be happening?

Thanks,
Don

Posted by dcbrien on September 13th, 2006


It looks like the problem is that I'm using XP 64 and you can't use
these functions for spying on this OS. I wonder what the equivilant in
64 is.

dcbrien@gmail.com wrote:


Similar Posts