Author: gadamopoulos
Date: Sat Mar 2 22:22:56 2013
New Revision: 58411
URL:
http://svn.reactos.org/svn/reactos?rev=58411&view=rev
Log:
[csrsrv]
- Remove CsrSetLogonNotifyWindow
- Use a reactos only TWOPARAM_ROUTINE_EXITREACTOS call in order to start the shut down
process in winlogon
- Use a NOPARAM_ROUTINE_ISCONSOLEMODE call in DtbgIsDesktopVisible to fix detecting
console mode in gui-on-demand mode
Modified:
trunk/reactos/win32ss/include/ntuser.h
trunk/reactos/win32ss/pch.h
trunk/reactos/win32ss/user/ntuser/simplecall.c
trunk/reactos/win32ss/user/win32csr/desktopbg.c
trunk/reactos/win32ss/user/win32csr/exitros.c
Modified: trunk/reactos/win32ss/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
==============================================================================
--- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Sat Mar 2 22:22:56 2013
@@ -3301,12 +3301,14 @@
* ReactOS-specific NtUser calls and their related structures, both which shouldn't
exist.
*/
+#define NOPARAM_ROUTINE_ISCONSOLEMODE 0xffff0001
#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
#define ONEPARAM_ROUTINE_CSRSS_GUICHECK 0xffff0008
#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0xfffd0050
+#define TWOPARAM_ROUTINE_EXITREACTOS 0xfffd0051
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0xfffd0052
#define MSQ_STATE_CAPTURE 0x1
#define MSQ_STATE_ACTIVE 0x2
Modified: trunk/reactos/win32ss/pch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/pch.h?rev=58411&am…
==============================================================================
--- trunk/reactos/win32ss/pch.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/pch.h [iso-8859-1] Sat Mar 2 22:22:56 2013
@@ -86,6 +86,7 @@
/* Undocumented user definitions */
#include <undocuser.h>
+#include <winlogon.h>
/* Freetype headers */
#include <ft2build.h>
Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Sat Mar 2 22:22:56 2013
@@ -128,6 +128,10 @@
pti->MessageQueue->spwndActive = NULL;
RETURN(0);
}
+
+ /* this is a Reactos only case and is needed for gui-on-demand */
+ case NOPARAM_ROUTINE_ISCONSOLEMODE:
+ RETURN( ScreenDeviceContext == NULL );
default:
ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n",
Routine);
@@ -473,6 +477,13 @@
case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK:
RETURN( IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2));
+ case TWOPARAM_ROUTINE_EXITREACTOS:
+ if(hwndSAS == NULL)
+ {
+ ASSERT(hwndSAS);
+ RETURN(STATUS_NOT_FOUND);
+ }
+ RETURN( co_IntSendMessage (hwndSAS, PM_WINLOGON_EXITWINDOWS, (WPARAM) Param1,
(LPARAM)Param2));
}
ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x
Parm2=0x%x\n",
Routine, Param1, Param2);
Modified: trunk/reactos/win32ss/user/win32csr/desktopbg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/win32csr/desk…
==============================================================================
--- trunk/reactos/win32ss/user/win32csr/desktopbg.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/win32csr/desktopbg.c [iso-8859-1] Sat Mar 2 22:22:56 2013
@@ -21,15 +21,7 @@
BOOL
FASTCALL DtbgIsDesktopVisible(VOID)
{
- HWND VisibleDesktopWindow = GetDesktopWindow(); // DESKTOPWNDPROC
-
- if (VisibleDesktopWindow != NULL &&
- !IsWindowVisible(VisibleDesktopWindow))
- {
- VisibleDesktopWindow = NULL;
- }
-
- return VisibleDesktopWindow != NULL;
+ return !((BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_ISCONSOLEMODE));
}
/* EOF */
Modified: trunk/reactos/win32ss/user/win32csr/exitros.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/win32csr/exit…
==============================================================================
--- trunk/reactos/win32ss/user/win32csr/exitros.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/win32csr/exitros.c [iso-8859-1] Sat Mar 2 22:22:56 2013
@@ -13,7 +13,6 @@
#include "resource.h"
#include <debug.h>
-static HWND LogonNotifyWindow = NULL;
static HANDLE LogonProcess = NULL;
CSR_API(CsrRegisterLogonProcess)
@@ -42,22 +41,6 @@
CSR_API(CsrSetLogonNotifyWindow)
{
- DWORD WindowCreator;
-
- if (0 ==
GetWindowThreadProcessId(Request->Data.SetLogonNotifyWindowRequest.LogonNotifyWindow,
- &WindowCreator))
- {
- DPRINT1("Can't get window creator\n");
- return STATUS_INVALID_HANDLE;
- }
- if (WindowCreator != (DWORD_PTR)LogonProcess)
- {
- DPRINT1("Trying to register window not created by winlogon as notify
window\n");
- return STATUS_ACCESS_DENIED;
- }
-
- LogonNotifyWindow = Request->Data.SetLogonNotifyWindowRequest.LogonNotifyWindow;
-
return STATUS_SUCCESS;
}
@@ -888,16 +871,9 @@
{
NTSTATUS Status;
- if (NULL == LogonNotifyWindow)
- {
- DPRINT1("No LogonNotifyWindow registered\n");
- return STATUS_NOT_FOUND;
- }
-
/* FIXME Inside 2000 says we should impersonate the caller here */
- Status = SendMessageW(LogonNotifyWindow, PM_WINLOGON_EXITWINDOWS,
- (WPARAM) UserProcessId,
- (LPARAM) Flags);
+ Status = NtUserCallTwoParam (UserProcessId, Flags, TWOPARAM_ROUTINE_EXITREACTOS);
+
/* If the message isn't handled, the return value is 0, so 0 doesn't
indicate
success. Success is indicated by a 1 return value, if anything besides 0
or 1 it's a NTSTATUS value */