Commit 5b803350 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Ignore HIWORD of boolean return values of 16-bit hook procedures, to

match buggy Windows behaviour.
parent 88ca57d2
......@@ -995,6 +995,15 @@ static LRESULT HOOK_CallHook( HANDLE16 hook, INT fromtype, INT code,
ret = data->proc(code, wParam, lParam);
/* Grrr. While the hook procedure is supposed to have an LRESULT return
value even in Win16, it seems that for those hook types where the
return value is interpreted as BOOL, Windows doesn't actually check
the HIWORD ... Some buggy Win16 programs, notably WINFILE, rely on
that, because they neglect to clear DX ... */
if ( (data->flags & HOOK_MAPTYPE) == HOOK_WIN16
&& data->id != WH_JOURNALPLAYBACK )
ret = LOWORD( ret );
TRACE(hook, "Ret hook %04x = %08lx\n", hook, ret );
data->flags &= ~HOOK_INUSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment