Author: hbelusca
Date: Sat Mar 9 21:52:12 2013
New Revision: 58455
URL:
http://svn.reactos.org/svn/reactos?rev=58455&view=rev
Log:
[CONSRV-USER32-WINSRV]
Pre-synchrosize with trunk, by applying some changes from revision r58411.
Modified:
branches/ros-csrss/include/reactos/subsys/win/winmsg.h
branches/ros-csrss/win32ss/user/consrv/console.c
branches/ros-csrss/win32ss/user/user32/misc/misc.c
branches/ros-csrss/win32ss/user/winsrv/register.c
branches/ros-csrss/win32ss/user/winsrv/shutdown.c
branches/ros-csrss/win32ss/user/winsrv/winsrv.h
Modified: branches/ros-csrss/include/reactos/subsys/win/winmsg.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
==============================================================================
--- branches/ros-csrss/include/reactos/subsys/win/winmsg.h [iso-8859-1] (original)
+++ branches/ros-csrss/include/reactos/subsys/win/winmsg.h [iso-8859-1] Sat Mar 9
21:52:12 2013
@@ -32,9 +32,6 @@
// UserpConsoleHandleOperation, // Added in Win7
// UserpGetSetShutdownBlockReason, // Added in Vista
- /// HACK: ReactOS-specific
- UserpRosSetLogonNotifyWindow,
-
UserpMaxApiNumber
} USERSRV_API_NUMBER, *PUSERSRV_API_NUMBER;
@@ -56,12 +53,6 @@
BOOL Register;
} CSRSS_REGISTER_LOGON_PROCESS, *PCSRSS_REGISTER_LOGON_PROCESS;
-/// HACK: ReactOS-specific
-typedef struct
-{
- HWND LogonNotifyWindow;
-} CSRSS_SET_LOGON_NOTIFY_WINDOW, *PCSRSS_SET_LOGON_NOTIFY_WINDOW;
-
typedef struct _USER_API_MESSAGE
{
@@ -76,9 +67,6 @@
CSRSS_EXIT_REACTOS ExitReactosRequest;
CSRSS_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest;
CSRSS_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest;
-
- /// HACK: ReactOS-specific
- CSRSS_SET_LOGON_NOTIFY_WINDOW SetLogonNotifyWindowRequest;
} Data;
} USER_API_MESSAGE, *PUSER_API_MESSAGE;
Modified: branches/ros-csrss/win32ss/user/consrv/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/console.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/console.c [iso-8859-1] Sat Mar 9 21:52:12
2013
@@ -31,15 +31,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));
}
VOID FASTCALL
Modified: branches/ros-csrss/win32ss/user/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/m…
==============================================================================
--- branches/ros-csrss/win32ss/user/user32/misc/misc.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/user32/misc/misc.c [iso-8859-1] Sat Mar 9 21:52:12
2013
@@ -74,24 +74,6 @@
WINAPI
SetLogonNotifyWindow(HWND Wnd, HWINSTA WinSta)
{
-/// HACK: Windows does not do this !! ReactOS-specific
- /* Maybe we should call NtUserSetLogonNotifyWindow and let that one inform CSRSS???
*/
- USER_API_MESSAGE Request;
- NTSTATUS Status;
-
- Request.Data.SetLogonNotifyWindowRequest.LogonNotifyWindow = Wnd;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&Request,
- NULL,
- CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX,
UserpRosSetLogonNotifyWindow),
- sizeof(CSRSS_SET_LOGON_NOTIFY_WINDOW));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-/// END HACK
-
return NtUserSetLogonNotifyWindow(Wnd);
}
@@ -100,10 +82,10 @@
*/
BOOL WINAPI
UpdatePerUserSystemParameters(
- DWORD dwReserved,
- BOOL bEnable)
-{
- return NtUserUpdatePerUserSystemParameters(dwReserved, bEnable);
+ DWORD dwReserved,
+ BOOL bEnable)
+{
+ return NtUserUpdatePerUserSystemParameters(dwReserved, bEnable);
}
PTHREADINFO
Modified: branches/ros-csrss/win32ss/user/winsrv/register.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/r…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/register.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/register.c [iso-8859-1] Sat Mar 9 21:52:12
2013
@@ -19,7 +19,6 @@
static BOOLEAN ServicesProcessIdValid = FALSE;
static ULONG_PTR ServicesProcessId = 0;
-HWND LogonNotifyWindow = NULL;
ULONG_PTR LogonProcessId = 0;
/* PUBLIC SERVER APIS *********************************************************/
@@ -50,29 +49,6 @@
return STATUS_SUCCESS;
}
-/// HACK: ReactOS-specific
-CSR_API(RosSetLogonNotifyWindow)
-{
- PCSRSS_SET_LOGON_NOTIFY_WINDOW SetLogonNotifyWindowRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.SetLogonNotifyWindowRequest;
- DWORD WindowCreator;
-
- if (0 == GetWindowThreadProcessId(SetLogonNotifyWindowRequest->LogonNotifyWindow,
- &WindowCreator))
- {
- DPRINT1("Can't get window creator\n");
- return STATUS_INVALID_HANDLE;
- }
- if (WindowCreator != LogonProcessId)
- {
- DPRINT1("Trying to register window not created by winlogon as notify
window\n");
- return STATUS_ACCESS_DENIED;
- }
-
- LogonNotifyWindow = SetLogonNotifyWindowRequest->LogonNotifyWindow;
-
- return STATUS_SUCCESS;
-}
-
CSR_API(SrvRegisterServicesProcess)
{
PCSRSS_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.RegisterServicesProcessRequest;
Modified: branches/ros-csrss/win32ss/user/winsrv/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/s…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/shutdown.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/shutdown.c [iso-8859-1] Sat Mar 9 21:52:12
2013
@@ -426,15 +426,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));
}
/* TODO: Find an other way to do it. */
@@ -894,16 +886,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 */
Modified: branches/ros-csrss/win32ss/user/winsrv/winsrv.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/w…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/winsrv.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/winsrv.h [iso-8859-1] Sat Mar 9 21:52:12 2013
@@ -51,7 +51,6 @@
extern HINSTANCE UserServerDllInstance;
extern HANDLE UserServerHeap;
-extern HWND LogonNotifyWindow;
extern ULONG_PTR LogonProcessId;
/* init.c */
@@ -64,8 +63,6 @@
/* register.c */
CSR_API(SrvRegisterServicesProcess);
CSR_API(SrvRegisterLogonProcess);
-/// HACK: ReactOS-specific
-CSR_API(RosSetLogonNotifyWindow);
/* shutdown.c */
CSR_API(SrvExitWindowsEx);