From 5c7cd6fe686859889ca0454a7140289a49da81fa Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 5 Dec 2011 07:43:29 +0000 Subject: [PATCH] - Fix return properties from atom. svn path=/trunk/; revision=54599 --- reactos/subsystems/win32/win32k/eng/engwindow.c | 9 +++++++-- reactos/subsystems/win32/win32k/ntuser/simplecall.c | 2 +- reactos/subsystems/win32/win32k/ntuser/windc.c | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/reactos/subsystems/win32/win32k/eng/engwindow.c b/reactos/subsystems/win32/win32k/eng/engwindow.c index 42a99d16910..9c86aa071c2 100644 --- a/reactos/subsystems/win32/win32k/eng/engwindow.c +++ b/reactos/subsystems/win32/win32k/eng/engwindow.c @@ -135,14 +135,19 @@ IntEngWindowChanged( PWND Window, FLONG flChanged) { + PPROPERTY pprop; WNDGDI *Current; HWND hWnd; ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL); hWnd = Window->head.h; - Current = (WNDGDI *)IntGetProp(Window, AtomWndObj); - + pprop = IntGetProp(Window, AtomWndObj); + if (!pprop) + { + return; + } + Current = (WNDGDI *)pprop->Data; if ( gcountPWO && Current && Current->Hwnd == hWnd && diff --git a/reactos/subsystems/win32/win32k/ntuser/simplecall.c b/reactos/subsystems/win32/win32k/ntuser/simplecall.c index e6039e6446c..dd306eac77b 100644 --- a/reactos/subsystems/win32/win32k/ntuser/simplecall.c +++ b/reactos/subsystems/win32/win32k/ntuser/simplecall.c @@ -633,7 +633,7 @@ NtUserCallHwnd( UserDerefObjectCo(Window); UserLeave(); - return (DWORD)HelpId; + return (DWORD)HelpId->Data; } case HWND_ROUTINE_REGISTERSHELLHOOKWINDOW: if (IntIsWindow(hWnd)) diff --git a/reactos/subsystems/win32/win32k/ntuser/windc.c b/reactos/subsystems/win32/win32k/ntuser/windc.c index 6cbc8943556..c3704b972dd 100644 --- a/reactos/subsystems/win32/win32k/ntuser/windc.c +++ b/reactos/subsystems/win32/win32k/ntuser/windc.c @@ -973,12 +973,15 @@ UserGethWnd( HDC hdc, PWNDOBJ *pwndo) PWNDGDI pWndgdi; PWND Wnd; HWND hWnd; + PPROPERTY pprop; hWnd = IntWindowFromDC(hdc); if (hWnd && !(Wnd = UserGetWindowObject(hWnd))) { - pWndgdi = (WNDGDI *)IntGetProp(Wnd, AtomWndObj); + pprop = IntGetProp(Wnd, AtomWndObj); + + pWndgdi = (WNDGDI *)pprop->Data; if ( pWndgdi && pWndgdi->Hwnd == hWnd ) {