From 7792b4bfea889759690b1ae161f843092995a883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 20 Apr 2005 07:25:14 +0000 Subject: [PATCH] You can ask for e.g. GWL_STYLE for the desktop window, but GWL_WNDPROC is off-limits for all windows if your process didn't create it svn path=/trunk/; revision=14709 --- reactos/subsys/win32k/ntuser/window.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index 3dab0ce0d4c..e04c0cf5c76 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Windows @@ -26,7 +25,9 @@ * REVISION HISTORY: * 06-06-2001 CSH Created */ + /* INCLUDES ******************************************************************/ + #include static WndProcHandle *WndProcHandlesArray = 0; @@ -3204,12 +3205,12 @@ NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi) } /* - * Only allow CSRSS to mess with the desktop window + * WndProc is only available to the owner process */ - if (hWnd == IntGetDesktopWindow() + if (GWL_WNDPROC == Index && WindowObject->OwnerThread->ThreadsProcess != PsGetCurrentProcess()) { - SetLastWin32Error(STATUS_ACCESS_DENIED); + SetLastWin32Error(ERROR_ACCESS_DENIED); return 0; }