fix broken condition in CallWindowProc

svn path=/trunk/; revision=28037
This commit is contained in:
Christoph von Wittich 2007-07-30 08:44:52 +00:00
parent c5eb377a58
commit a629f387b9

View file

@ -1239,16 +1239,19 @@ CallWindowProcA(WNDPROC lpPrevWndFunc,
if (lpPrevWndFunc == NULL) if (lpPrevWndFunc == NULL)
lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWLP_WNDPROC, TRUE); lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWLP_WNDPROC, TRUE);
if (!IsCallProcHandle(lpPrevWndFunc) || if (!IsCallProcHandle(lpPrevWndFunc))
!NtUserDereferenceWndProcHandle((HANDLE)lpPrevWndFunc, return IntCallWindowProcA(TRUE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
&wpInfo))
{
return IntCallWindowProcA(TRUE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
}
else else
{ {
return IntCallWindowProcA(!wpInfo.IsUnicode, wpInfo.WindowProc, if (NtUserDereferenceWndProcHandle((HANDLE)lpPrevWndFunc,
hWnd, Msg, wParam, lParam); &wpInfo))
return IntCallWindowProcA(!wpInfo.IsUnicode, wpInfo.WindowProc,
hWnd, Msg, wParam, lParam);
else
{
DPRINT("CallWindowProcA: can not dereference WndProcHandle\n");
return 0;
}
} }
} }
@ -1269,17 +1272,20 @@ CallWindowProcW(WNDPROC lpPrevWndFunc,
if (lpPrevWndFunc == NULL) if (lpPrevWndFunc == NULL)
lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWLP_WNDPROC, FALSE); lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWLP_WNDPROC, FALSE);
if (!IsCallProcHandle(lpPrevWndFunc) || if (!IsCallProcHandle(lpPrevWndFunc))
!NtUserDereferenceWndProcHandle((HANDLE)lpPrevWndFunc, return IntCallWindowProcW(FALSE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
&wpInfo))
{
return IntCallWindowProcW(FALSE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
}
else else
{ {
if (NtUserDereferenceWndProcHandle((HANDLE)lpPrevWndFunc,
&wpInfo))
return IntCallWindowProcW(!wpInfo.IsUnicode, wpInfo.WindowProc, return IntCallWindowProcW(!wpInfo.IsUnicode, wpInfo.WindowProc,
hWnd, Msg, wParam, lParam); hWnd, Msg, wParam, lParam);
} else
{
DPRINT("CallWindowProcW: can not dereference WndProcHandle\n");
return 0;
}
}
} }