Michael Stefaniuc mstefani@redhat.com writes:
I don't know what the right fix would be, I'm seeing two possibilities:
- remove in CallNextHookEx16 the check if (HIWORD(hhook) != HOOK_MAGIC) return 0;
- or transform in DefHookProc16 and ShellHookProc16 the first parameter passed to CallNextHookEx16 to a real HHOOK with the HIWORD set to 'HC'
The second is right, we should always pass a real HHOOK. In fact a hook handle is 32 bit even in Win16, so it's never correct to assign it to a HANDLE16; we do this at a few other places too, that should probably be fixed.