CallNextHookEx16 strageness

Alexandre Julliard julliard at
Tue Jul 23 14:01:25 CDT 2002

Michael Stefaniuc <mstefani at> 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.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list