Author: hbelusca
Date: Sat Nov 29 21:19:01 2014
New Revision: 65528
URL:
http://svn.reactos.org/svn/reactos?rev=65528&view=rev
Log:
[USER32]
- On Win2k3, the EXIT_(ROS)_EX csr message has 3 parameters, instead of 2 (as on win2k),
and the dwReserved is in fact unused.
[USERSRV]
- Add CSR shutdown callback UserClientShutdown (stub).
[CONSRV|USERSRV]
- The CSR shutdown callbacks are just stubs currently.
Part 5/X
CORE-8322
Modified:
trunk/reactos/include/reactos/subsys/win/winmsg.h
trunk/reactos/win32ss/user/user32/misc/exit.c
trunk/reactos/win32ss/user/winsrv/consrv/shutdown.c
trunk/reactos/win32ss/user/winsrv/usersrv/api.h
trunk/reactos/win32ss/user/winsrv/usersrv/harderror.c
trunk/reactos/win32ss/user/winsrv/usersrv/init.c
trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c
Modified: trunk/reactos/include/reactos/subsys/win/winmsg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/win…
==============================================================================
--- trunk/reactos/include/reactos/subsys/win/winmsg.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/subsys/win/winmsg.h [iso-8859-1] Sat Nov 29 21:19:01
2014
@@ -38,8 +38,9 @@
typedef struct _USER_EXIT_REACTOS
{
- UINT Flags;
- DWORD Reserved;
+ DWORD LastError;
+ UINT Flags;
+ BOOL Success;
} USER_EXIT_REACTOS, *PUSER_EXIT_REACTOS;
typedef struct _USER_END_TASK
Modified: trunk/reactos/win32ss/user/user32/misc/exit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/e…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/exit.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/exit.c [iso-8859-1] Sat Nov 29 21:19:01 2014
@@ -60,6 +60,7 @@
* - when every environment subsystem has gone to bed, the SM actually initiates
* the kernel and executive shutdown by calling NtShutdownSystem.
*/
+
/*
* @implemented
*/
@@ -71,7 +72,7 @@
USER_API_MESSAGE ApiMessage;
ApiMessage.Data.ExitReactosRequest.Flags = uFlags;
- ApiMessage.Data.ExitReactosRequest.Reserved = dwReserved;
+ // ApiMessage.Data.ExitReactosRequest.Reserved = dwReserved;
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
@@ -79,7 +80,7 @@
sizeof(USER_EXIT_REACTOS));
if (!NT_SUCCESS(Status))
{
- SetLastError(RtlNtStatusToDosError(Status));
+ UserSetLastNTError(Status);
return FALSE;
}
Modified: trunk/reactos/win32ss/user/winsrv/consrv/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/shutdown.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/shutdown.c [iso-8859-1] Sat Nov 29 21:19:01
2014
@@ -23,6 +23,8 @@
IN BOOLEAN FirstPhase)
{
PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(CsrProcess);
+
+ UNIMPLEMENTED;
if ( ProcessData->ConsoleHandle != NULL ||
ProcessData->HandleTable != NULL )
Modified: trunk/reactos/win32ss/user/winsrv/usersrv/api.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/usersr…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/usersrv/api.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/usersrv/api.h [iso-8859-1] Sat Nov 29 21:19:01 2014
@@ -16,14 +16,22 @@
CSR_API(SrvDeviceEvent);
/* harderror.c */
-VOID WINAPI UserServerHardError(IN PCSR_THREAD ThreadData,
- IN PHARDERROR_MSG Message);
+VOID
+NTAPI
+UserServerHardError(IN PCSR_THREAD ThreadData,
+ IN PHARDERROR_MSG Message);
/* register.c */
CSR_API(SrvRegisterServicesProcess);
CSR_API(SrvRegisterLogonProcess);
/* shutdown.c */
+ULONG
+NTAPI
+UserClientShutdown(IN PCSR_PROCESS CsrProcess,
+ IN ULONG Flags,
+ IN BOOLEAN FirstPhase);
+
CSR_API(SrvExitWindowsEx);
CSR_API(SrvEndTask);
CSR_API(SrvLogon);
Modified: trunk/reactos/win32ss/user/winsrv/usersrv/harderror.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/usersr…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/usersrv/harderror.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/usersrv/harderror.c [iso-8859-1] Sat Nov 29 21:19:01
2014
@@ -510,7 +510,7 @@
}
VOID
-WINAPI
+NTAPI
UserServerHardError(
IN PCSR_THREAD ThreadData,
IN PHARDERROR_MSG Message)
Modified: trunk/reactos/win32ss/user/winsrv/usersrv/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/usersr…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/usersrv/init.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/usersrv/init.c [iso-8859-1] Sat Nov 29 21:19:01
2014
@@ -151,7 +151,7 @@
UserServerHeap = RtlGetProcessHeap();
/* Initialize the video */
- NtUserInitialize(0, NULL, NULL); //
+ NtUserInitialize(0, NULL, NULL);
PrivateCsrssManualGuiCheck(0);
/* Setup the DLL Object */
@@ -166,7 +166,7 @@
LoadedServerDll->ConnectCallback = NULL;
LoadedServerDll->DisconnectCallback = NULL;
LoadedServerDll->HardErrorCallback = UserServerHardError;
- LoadedServerDll->ShutdownProcessCallback = NULL;
+ LoadedServerDll->ShutdownProcessCallback = UserClientShutdown;
UserServerDllInstance = LoadedServerDll->ServerHandle;
Modified: trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/usersr…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c [iso-8859-1] Sat Nov 29 21:19:01
2014
@@ -919,6 +919,21 @@
}
+ULONG
+NTAPI
+UserClientShutdown(IN PCSR_PROCESS CsrProcess,
+ IN ULONG Flags,
+ IN BOOLEAN FirstPhase)
+{
+ DPRINT1("UserClientShutdown(0x%p, 0x%x, %s)\n",
+ CsrProcess, Flags, FirstPhase ? "FirstPhase" :
"LastPhase");
+
+ UNIMPLEMENTED;
+
+ return CsrShutdownNonCsrProcess;
+}
+
+
/* PUBLIC SERVER APIS *********************************************************/
CSR_API(SrvExitWindowsEx)