Author: janderwald
Date: Thu Sep 17 17:20:24 2009
New Revision: 43062
URL:
http://svn.reactos.org/svn/reactos?rev=43062&view=rev
Log:
- Fix 2 user32 winstation test failures (patch by Giannis Adamopoulos johnyadams
(_AT_)hotmail (D-O-T) com
- Revert hack from 43061 and fix it properly
- Test results verified by Amine Khaldi
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] Thu Sep 17
17:20:24 2009
@@ -1152,7 +1152,7 @@
WinSta = UserGetProcessWindowStation();
- Status = IntValidateWindowStationHandle(WinSta, UserMode, 0
/*WINSTA_ACCESSCLIPBOARD*/, &WinStaObj);
+ Status = IntValidateWindowStationHandle(WinSta, KernelMode, WINSTA_ACCESSCLIPBOARD,
&WinStaObj);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] Thu Sep 17 17:20:24
2009
@@ -630,14 +630,14 @@
InitializeObjectAttributes(
&ObjectAttributes,
&WindowStationName,
- 0,
+ OBJ_CASE_INSENSITIVE,
NULL,
NULL);
Status = ObOpenObjectByName(
&ObjectAttributes,
ExWindowStationObjectType,
- UserMode,
+ KernelMode,
NULL,
dwDesiredAccess,
NULL,
@@ -686,6 +686,11 @@
NTSTATUS Status;
DPRINT("About to close window station handle (0x%X)\n", hWinSta);
+
+ if (hWinSta == UserGetProcessWindowStation())
+ {
+ return FALSE;
+ }
Status = IntValidateWindowStationHandle(
hWinSta,