Author: hbelusca
Date: Sun Apr 14 12:14:00 2013
New Revision: 58753
URL:
http://svn.reactos.org/svn/reactos?rev=58753&view=rev
Log:
[CONSOLE.CPL-KERNEL32-USER32-NTDLL-CSRSRV-CONSRV-BASESRV-WINSRV]
- Fix some comments.
- Remove unuseful DPRINTs and just shut-up some DPRINT1s.
- Rename remaining CSRSS_*** structures.
Modified:
branches/ros-csrss/dll/cpl/console/console.c
branches/ros-csrss/dll/cpl/console/layout.c
branches/ros-csrss/dll/ntdll/csr/api.c
branches/ros-csrss/dll/ntdll/csr/capture.c
branches/ros-csrss/dll/ntdll/csr/connect.c
branches/ros-csrss/dll/win32/kernel32/client/console/console.c
branches/ros-csrss/dll/win32/kernel32/client/dllmain.c
branches/ros-csrss/dll/win32/kernel32/client/path.c
branches/ros-csrss/dll/win32/kernel32/client/proc.c
branches/ros-csrss/dll/win32/kernel32/client/vdm.c
branches/ros-csrss/include/reactos/subsys/csr/csrmsg.h
branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h
branches/ros-csrss/include/reactos/subsys/win/base.h
branches/ros-csrss/include/reactos/subsys/win/basemsg.h
branches/ros-csrss/include/reactos/subsys/win/conmsg.h
branches/ros-csrss/include/reactos/subsys/win/console.h
branches/ros-csrss/include/reactos/subsys/win/winmsg.h
branches/ros-csrss/subsystems/win/basesrv/init.c
branches/ros-csrss/subsystems/win32/csrsrv/procsup.c
branches/ros-csrss/subsystems/win32/csrsrv/server.c
branches/ros-csrss/win32ss/user/consrv/coninput.c
branches/ros-csrss/win32ss/user/consrv/conoutput.c
branches/ros-csrss/win32ss/user/consrv/console.c
branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c
branches/ros-csrss/win32ss/user/user32/misc/exit.c
branches/ros-csrss/win32ss/user/user32/misc/misc.c
branches/ros-csrss/win32ss/user/winsrv/CMakeLists.txt
branches/ros-csrss/win32ss/user/winsrv/harderror.c
branches/ros-csrss/win32ss/user/winsrv/init.c
branches/ros-csrss/win32ss/user/winsrv/register.c
branches/ros-csrss/win32ss/user/winsrv/shutdown.c
Modified: branches/ros-csrss/dll/cpl/console/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/conso…
==============================================================================
--- branches/ros-csrss/dll/cpl/console/console.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/cpl/console/console.c [iso-8859-1] Sun Apr 14 12:14:00 2013
@@ -196,7 +196,6 @@
}
}
- // if (res == IDC_RADIO_APPLY_ALL || res == IDC_RADIO_APPLY_CURRENT)
if (SetParams)
{
HANDLE hSection;
@@ -290,10 +289,6 @@
return 0;
}
- // if (IsBadReadPtr((PVOID)pSharedInfo, sizeof(CONSOLE_PROPS)))
- // {
- // }
-
/* Find the console window and whether we must use default parameters */
pConInfo->hConsoleWindow = pSharedInfo->hConsoleWindow;
pConInfo->ShowDefaultParams = pSharedInfo->ShowDefaultParams;
Modified: branches/ros-csrss/dll/cpl/console/layout.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/layou…
==============================================================================
--- branches/ros-csrss/dll/cpl/console/layout.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/cpl/console/layout.c [iso-8859-1] Sun Apr 14 12:14:00 2013
@@ -13,13 +13,13 @@
const TCHAR szPreviewText[] =
_T("C:\\ReactOS> dir \n") \
- _T("SYSTEM <DIR> 03-03-13 5:00a\n") \
- _T("SYSTEM32 <DIR> 03-03-13 5:00a\n") \
- _T("readme txt 1739 03-03-13 5:00a\n") \
- _T("explorer exe 3329536 03-03-13 5:00a\n") \
- _T("vgafonts cab 18736 03-03-13 5:00a\n") \
- _T("setuplog txt 313 03-03-13 5:00a\n") \
- _T("win ini 7005 03-03-13 5:00a\n");
+ _T("SYSTEM <DIR> 03-04-15 5:00a\n") \
+ _T("SYSTEM32 <DIR> 03-04-15 5:00a\n") \
+ _T("readme txt 1739 03-04-15 5:00a\n") \
+ _T("explorer exe 3329536 03-04-15 5:00a\n") \
+ _T("vgafonts cab 18736 03-04-15 5:00a\n") \
+ _T("setuplog txt 313 03-04-15 5:00a\n") \
+ _T("win ini 7005 03-04-15 5:00a\n");
VOID
Modified: branches/ros-csrss/dll/ntdll/csr/api.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/csr/api.c?r…
==============================================================================
--- branches/ros-csrss/dll/ntdll/csr/api.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/ntdll/csr/api.c [iso-8859-1] Sun Apr 14 12:14:00 2013
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
- * FILE: lib/ntdll/csr/api.c
+ * FILE: dll/ntdll/csr/api.c
* PURPOSE: CSR APIs exported through NTDLL
* PROGRAMMER: Alex Ionescu (alex(a)relsoft.net)
*/
Modified: branches/ros-csrss/dll/ntdll/csr/capture.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/csr/capture…
==============================================================================
--- branches/ros-csrss/dll/ntdll/csr/capture.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/ntdll/csr/capture.c [iso-8859-1] Sun Apr 14 12:14:00 2013
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
- * FILE: lib/ntdll/csr/capture.c
+ * FILE: dll/ntdll/csr/capture.c
* PURPOSE: Routines for probing and capturing CSR API Messages
* PROGRAMMER: Alex Ionescu (alex(a)relsoft.net)
*/
@@ -94,7 +94,8 @@
if (BufferSize >= MAXLONG) return NULL;
/* Add the size of the header and for each offset to the pointers */
- BufferSize += FIELD_OFFSET(CSR_CAPTURE_BUFFER, PointerOffsetsArray) + (ArgumentCount
* sizeof(ULONG_PTR));
+ BufferSize += FIELD_OFFSET(CSR_CAPTURE_BUFFER, PointerOffsetsArray) +
+ (ArgumentCount * sizeof(ULONG_PTR));
/* Align it to a 4-byte boundary */
BufferSize = (BufferSize + 3) & ~3;
Modified: branches/ros-csrss/dll/ntdll/csr/connect.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/csr/connect…
==============================================================================
--- branches/ros-csrss/dll/ntdll/csr/connect.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/ntdll/csr/connect.c [iso-8859-1] Sun Apr 14 12:14:00 2013
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
- * FILE: lib/ntdll/csr/connect.c
+ * FILE: dll/ntdll/csr/connect.c
* PURPOSE: Routines for connecting and calling CSR
* PROGRAMMER: Alex Ionescu (alex(a)relsoft.net)
*/
@@ -54,14 +54,14 @@
ULONG PointerCount;
PULONG_PTR OffsetPointer;
- /* Fill out the Port Message Header. */
+ /* Fill out the Port Message Header */
ApiMessage->Header.u2.ZeroInit = 0;
ApiMessage->Header.u1.s1.TotalLength =
FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength;
ApiMessage->Header.u1.s1.DataLength =
ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
- /* Fill out the CSR Header. */
+ /* Fill out the CSR Header */
ApiMessage->ApiNumber = ApiNumber;
ApiMessage->CsrCaptureData = NULL;
@@ -70,10 +70,10 @@
ApiMessage->Header.u1.s1.DataLength,
ApiMessage->Header.u1.s1.TotalLength);
- /* Check if we are already inside a CSR Server. */
+ /* Check if we are already inside a CSR Server */
if (!InsideCsrProcess)
{
- /* Check if we got a Capture Buffer. */
+ /* Check if we got a Capture Buffer */
if (CaptureBuffer)
{
/*
@@ -104,12 +104,12 @@
}
}
- /* Send the LPC Message. */
+ /* Send the LPC Message */
Status = NtRequestWaitReplyPort(CsrApiPort,
&ApiMessage->Header,
&ApiMessage->Header);
- /* Check if we got a Capture Buffer. */
+ /* Check if we got a Capture Buffer */
if (CaptureBuffer)
{
/*
@@ -137,7 +137,7 @@
}
}
- /* Check for success. */
+ /* Check for success */
if (!NT_SUCCESS(Status))
{
/* We failed. Overwrite the return value with the failure. */
@@ -150,13 +150,13 @@
/* This is a server-to-server call. Save our CID and do a direct call. */
DPRINT1("Next gen server-to-server call\n");
- /* We check this equality inside CsrValidateMessageBuffer. */
+ /* We check this equality inside CsrValidateMessageBuffer */
ApiMessage->Header.ClientId = NtCurrentTeb()->ClientId;
Status = CsrServerApiRoutine(&ApiMessage->Header,
&ApiMessage->Header);
- /* Check for success. */
+ /* Check for success */
if (!NT_SUCCESS(Status))
{
/* We failed. Overwrite the return value with the failure. */
@@ -164,7 +164,7 @@
}
}
- /* Return the CSR Result. */
+ /* Return the CSR Result */
DPRINT("Got back: 0x%lx\n", ApiMessage->Status);
return ApiMessage->Status;
}
@@ -404,7 +404,8 @@
if (!CsrApiPort)
{
/* No, set it up now */
- if (!NT_SUCCESS(Status = CsrpConnectToServer(ObjectDirectory)))
+ Status = CsrpConnectToServer(ObjectDirectory);
+ if (!NT_SUCCESS(Status))
{
/* Failed */
DPRINT1("Failure to connect to CSR\n");
Modified: branches/ros-csrss/dll/win32/kernel32/client/console/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/client/console/console.c [iso-8859-1]
(original)
+++ branches/ros-csrss/dll/win32/kernel32/client/console/console.c [iso-8859-1] Sun Apr 14
12:14:00 2013
@@ -2227,8 +2227,8 @@
* \name GetConsoleInputExeNameW
* \brief Retrieves the console input file name as unicode string.
* \param nBufferLength Length of the buffer in WCHARs.
- * Specify 0 to recieve the needed buffer length.
- * \param lpBuffer Pointer to a buffer that recieves the string.
+ * Specify 0 to receive the needed buffer length.
+ * \param lpBuffer Pointer to a buffer that receives the string.
* \return Needed buffer size if \p nBufferLength is 0.
* Otherwise 1 if successful, 2 if buffer is too small.
* \remarks Sets last error value to ERROR_BUFFER_OVERFLOW if the buffer
@@ -2274,10 +2274,10 @@
* \name GetConsoleInputExeNameA
* \brief Retrieves the console input file name as ansi string.
* \param nBufferLength Length of the buffer in CHARs.
- * \param lpBuffer Pointer to a buffer that recieves the string.
+ * \param lpBuffer Pointer to a buffer that receives the string.
* \return 1 if successful, 2 if buffer is too small.
* \remarks Sets last error value to ERROR_BUFFER_OVERFLOW if the buffer
- * is not big enough. The buffer recieves as much characters as fit.
+ * is not big enough. The buffer receives as much characters as fit.
*/
DWORD
WINAPI
Modified: branches/ros-csrss/dll/win32/kernel32/client/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/client/dllmain.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/win32/kernel32/client/dllmain.c [iso-8859-1] Sun Apr 14
12:14:00 2013
@@ -134,7 +134,6 @@
}
/* Connect to the base server */
- DPRINT("Connecting to CSR in DllMain...\n");
Status = CsrClientConnectToServer(SessionDir,
BASESRV_SERVERDLL_INDEX,
&Dummy,
@@ -146,7 +145,6 @@
NtTerminateProcess(NtCurrentProcess(), Status);
return FALSE;
}
- DPRINT("kernel32 DllMain - OK, connection succeeded\n");
/* Get the server data */
ASSERT(Peb->ReadOnlyStaticServerData);
@@ -214,13 +212,11 @@
/* Insert more dll attach stuff here! */
DllInitialized = TRUE;
- DPRINT("Initialization complete\n");
break;
}
case DLL_PROCESS_DETACH:
{
- DPRINT("DLL_PROCESS_DETACH\n");
if (DllInitialized == TRUE)
{
/* Insert more dll detach stuff here! */
Modified: branches/ros-csrss/dll/win32/kernel32/client/path.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/client/path.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/win32/kernel32/client/path.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -1430,7 +1430,7 @@
}
Quickie:
- /* Check if there was a dynamic path stirng to free */
+ /* Check if there was a dynamic path string to free */
if ((PathString.Buffer != lpPath) && (PathString.Buffer))
{
/* And free it */
Modified: branches/ros-csrss/dll/win32/kernel32/client/proc.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/client/proc.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/win32/kernel32/client/proc.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -581,7 +581,7 @@
/*
* For GUI applications we turn on the 2nd bit. This also allows
- * us to know whether or not the application is a GUI or CUI app.
+ * us to know whether or not this is a GUI or a TUI application.
*/
if (IMAGE_SUBSYSTEM_WINDOWS_GUI == SectionImageInfo->SubSystemType)
{
@@ -1856,7 +1856,7 @@
ULONG Response;
NTSTATUS Status;
- /* Setup the stirng to print out */
+ /* Setup the string to print out */
RtlInitUnicodeString(&UnicodeString, lpMessageText);
/* Display the hard error no matter what */
Modified: branches/ros-csrss/dll/win32/kernel32/client/vdm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/client/vdm.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/win32/kernel32/client/vdm.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -233,7 +233,7 @@
}
else
{
- /* Non-DOS, build the stirng for it without the task ID */
+ /* Non-DOS, build the string for it without the task ID */
_snwprintf(CommandLine,
sizeof(CommandLine),
L"\"%s\\ntvdm.exe\" %s%c",
Modified: branches/ros-csrss/include/reactos/subsys/csr/csrmsg.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
==============================================================================
--- branches/ros-csrss/include/reactos/subsys/csr/csrmsg.h [iso-8859-1] (original)
+++ branches/ros-csrss/include/reactos/subsys/csr/csrmsg.h [iso-8859-1] Sun Apr 14
12:14:00 2013
@@ -33,7 +33,7 @@
/*
-typedef union _CSR_API_NUMBER
+typedef struct _CSR_API_NUMBER
{
WORD Index;
WORD Subsystem;
Modified: branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
==============================================================================
--- branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h [iso-8859-1] (original)
+++ branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h [iso-8859-1] Sun Apr 14
12:14:00 2013
@@ -9,15 +9,6 @@
#ifndef _CSRSRV_H
#define _CSRSRV_H
-
-// see
http://code.google.com/p/ontl/source/browse/branches/x64/ntl/nt/csr.hxx?r=67
-
-/*
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning (disable:4201)
-#endif
-*/
#include "csrmsg.h"
@@ -213,6 +204,7 @@
IN BOOLEAN FirstPhase
);
+// See
http://redplait.blogspot.fr/2011/07/csrserverdll.html
typedef struct _CSR_SERVER_DLL
{
ULONG Length;
@@ -221,8 +213,8 @@
HANDLE ServerHandle;
ULONG ServerId;
ULONG Unknown;
- ULONG ApiBase; // ApiNumberBase
- ULONG HighestApiSupported; // MaxApiNumber
+ ULONG ApiBase;
+ ULONG HighestApiSupported;
PCSR_API_ROUTINE *DispatchTable;
PBOOLEAN ValidTable; // Table of booleans which describe whether or not a server
function call is valid when it is called via CsrCallServerFromServer.
PCHAR *NameTable;
@@ -230,7 +222,7 @@
PCSR_CONNECT_CALLBACK ConnectCallback;
PCSR_DISCONNECT_CALLBACK DisconnectCallback;
PCSR_HARDERROR_CALLBACK HardErrorCallback;
- PVOID SharedSection; // SharedStaticServerData
+ PVOID SharedSection;
PCSR_NEWPROCESS_CALLBACK NewProcessCallback;
PCSR_SHUTDOWNPROCESS_CALLBACK ShutdownProcessCallback;
ULONG Unknown2[3];
@@ -419,12 +411,6 @@
CsrValidateMessageString(IN PCSR_API_MESSAGE ApiMessage,
IN LPWSTR *MessageString);
-/*
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-*/
-
#endif // _CSRSRV_H
/* EOF */
Modified: branches/ros-csrss/include/reactos/subsys/win/base.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
==============================================================================
--- branches/ros-csrss/include/reactos/subsys/win/base.h [iso-8859-1] (original)
+++ branches/ros-csrss/include/reactos/subsys/win/base.h [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -1,6 +1,6 @@
/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS Client/Server Runtime SubSystem
+ * PROJECT: ReactOS Base API Server DLL
* FILE: include/reactos/subsys/win/base.h
* PURPOSE: Public definitions for Base API Clients
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr)
Modified: branches/ros-csrss/include/reactos/subsys/win/basemsg.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
==============================================================================
--- branches/ros-csrss/include/reactos/subsys/win/basemsg.h [iso-8859-1] (original)
+++ branches/ros-csrss/include/reactos/subsys/win/basemsg.h [iso-8859-1] Sun Apr 14
12:14:00 2013
@@ -1,6 +1,6 @@
/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS Client/Server Runtime SubSystem
+ * PROJECT: ReactOS Base API Server DLL
* FILE: include/reactos/subsys/win/basemsg.h
* PURPOSE: Public definitions for communication
* between Base API Clients and Servers
@@ -184,7 +184,7 @@
PCSR_CAPTURE_BUFFER CsrCaptureData;
CSR_API_NUMBER ApiNumber;
- NTSTATUS Status; // ReturnValue;
+ NTSTATUS Status;
ULONG Reserved;
union
{
Modified: branches/ros-csrss/include/reactos/subsys/win/conmsg.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
==============================================================================
--- branches/ros-csrss/include/reactos/subsys/win/conmsg.h [iso-8859-1] (original)
+++ branches/ros-csrss/include/reactos/subsys/win/conmsg.h [iso-8859-1] Sun Apr 14
12:14:00 2013
@@ -1,6 +1,6 @@
/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS Client/Server Runtime SubSystem
+ * PROJECT: ReactOS Console Server DLL
* FILE: include/reactos/subsys/win/conmsg.h
* PURPOSE: Public definitions for communication
* between Console API Clients and Servers
@@ -131,7 +131,7 @@
/* Adapted from CONSOLE_ALLOCCONSOLE */
CONSOLE_START_INFO ConsoleStartInfo;
- HANDLE Console; // ConsoleHandle // In fact, it is a PCSRSS_CONSOLE <-- correct
that !!
+ HANDLE Console; // ConsoleHandle // On ReactOS, it is a PCSRSS_CONSOLE
HANDLE InputHandle;
HANDLE OutputHandle;
HANDLE ErrorHandle;
@@ -180,7 +180,7 @@
{
PCONSOLE_START_INFO ConsoleStartInfo;
- HANDLE Console; // ConsoleHandle // In fact, it is a PCSRSS_CONSOLE <-- correct
that !!
+ HANDLE Console; // ConsoleHandle // On ReactOS, it is a PCSRSS_CONSOLE
HANDLE InputHandle;
HANDLE OutputHandle;
HANDLE ErrorHandle;
@@ -192,7 +192,7 @@
typedef struct
{
DWORD ProcessId; // If ProcessId == ATTACH_PARENT_PROCESS == -1, then attach the
current process to its parent process console.
- HANDLE Console; // ConsoleHandle // In fact, it is a PCSRSS_CONSOLE <-- correct
that !!
+ HANDLE Console; // ConsoleHandle // On ReactOS, it is a PCSRSS_CONSOLE
HANDLE InputHandle;
HANDLE OutputHandle;
HANDLE ErrorHandle;
@@ -585,7 +585,7 @@
PCSR_CAPTURE_BUFFER CsrCaptureData;
CSR_API_NUMBER ApiNumber;
- NTSTATUS Status; // ReturnValue;
+ NTSTATUS Status;
ULONG Reserved;
union
{
Modified: branches/ros-csrss/include/reactos/subsys/win/console.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
==============================================================================
--- branches/ros-csrss/include/reactos/subsys/win/console.h [iso-8859-1] (original)
+++ branches/ros-csrss/include/reactos/subsys/win/console.h [iso-8859-1] Sun Apr 14
12:14:00 2013
@@ -1,6 +1,6 @@
/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS Client/Server Runtime SubSystem
+ * PROJECT: ReactOS Console Server DLL
* FILE: include/reactos/subsys/win/console.h
* PURPOSE: Public definitions for Console API Clients
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr)
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] Sun Apr 14
12:14:00 2013
@@ -1,6 +1,6 @@
/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS Client/Server Runtime SubSystem
+ * PROJECT: ReactOS User API Server DLL
* FILE: include/reactos/subsys/win/winmsg.h
* PURPOSE: Public definitions for communication
* between User-Mode API Clients and Servers
@@ -40,18 +40,18 @@
{
UINT Flags;
DWORD Reserved;
-} CSRSS_EXIT_REACTOS, *PCSRSS_EXIT_REACTOS;
+} USER_EXIT_REACTOS, *PUSER_EXIT_REACTOS;
typedef struct
{
ULONG_PTR ProcessId;
-} CSRSS_REGISTER_SERVICES_PROCESS, *PCSRSS_REGISTER_SERVICES_PROCESS;
+} USER_REGISTER_SERVICES_PROCESS, *PUSER_REGISTER_SERVICES_PROCESS;
typedef struct
{
ULONG_PTR ProcessId;
BOOL Register;
-} CSRSS_REGISTER_LOGON_PROCESS, *PCSRSS_REGISTER_LOGON_PROCESS;
+} USER_REGISTER_LOGON_PROCESS, *PUSER_REGISTER_LOGON_PROCESS;
typedef struct _USER_API_MESSAGE
@@ -60,13 +60,13 @@
PCSR_CAPTURE_BUFFER CsrCaptureData;
CSR_API_NUMBER ApiNumber;
- NTSTATUS Status; // ReturnValue;
+ NTSTATUS Status;
ULONG Reserved;
union
{
- CSRSS_EXIT_REACTOS ExitReactosRequest;
- CSRSS_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest;
- CSRSS_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest;
+ USER_EXIT_REACTOS ExitReactosRequest;
+ USER_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest;
+ USER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest;
} Data;
} USER_API_MESSAGE, *PUSER_API_MESSAGE;
Modified: branches/ros-csrss/subsystems/win/basesrv/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win/basesr…
==============================================================================
--- branches/ros-csrss/subsystems/win/basesrv/init.c [iso-8859-1] (original)
+++ branches/ros-csrss/subsystems/win/basesrv/init.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -138,16 +138,19 @@
SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY};
SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY};
NTSTATUS Status;
- // UCHAR KeyValueBuffer[0x40];
- // PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo;
- // UNICODE_STRING KeyName;
- // ULONG ProtectionMode = 0;
- ULONG AclLength; // , ResultLength;
- // HANDLE hKey;
- // OBJECT_ATTRIBUTES ObjectAttributes;
+#if 0 // Unused code
+ UCHAR KeyValueBuffer[0x40];
+ PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo;
+ UNICODE_STRING KeyName;
+ ULONG ProtectionMode = 0;
+#endif
+ ULONG AclLength;
+#if 0 // Unused code
+ ULONG ResultLength;
+ HANDLE hKey;
+ OBJECT_ATTRIBUTES ObjectAttributes;
/* Open the Session Manager Key */
- /*
RtlInitUnicodeString(&KeyName, SM_REG_KEY);
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
@@ -157,7 +160,7 @@
Status = NtOpenKey(&hKey, KEY_READ, &ObjectAttributes);
if (NT_SUCCESS(Status))
{
- /\* Read the key value *\/
+ /* Read the key value */
RtlInitUnicodeString(&KeyName, L"ProtectionMode");
Status = NtQueryValueKey(hKey,
&KeyName,
@@ -166,19 +169,19 @@
sizeof(KeyValueBuffer),
&ResultLength);
- /\* Make sure it's what we expect it to be *\/
+ /* Make sure it's what we expect it to be */
KeyValuePartialInfo = (PKEY_VALUE_PARTIAL_INFORMATION)KeyValueBuffer;
if ((NT_SUCCESS(Status)) && (KeyValuePartialInfo->Type == REG_DWORD)
&&
(*(PULONG)KeyValuePartialInfo->Data))
{
- /\* Save the Protection Mode *\/
- // ProtectionMode = *(PULONG)KeyValuePartialInfo->Data;
+ /* Save the Protection Mode */
+ ProtectionMode = *(PULONG)KeyValuePartialInfo->Data;
}
- /\* Close the handle *\/
+ /* Close the handle */
NtClose(hKey);
}
- */
+#endif
/* Allocate the System SID */
Status = RtlAllocateAndInitializeSid(&NtAuthority,
@@ -520,8 +523,8 @@
CSR_SERVER_DLL_INIT(ServerDllInitialization)
{
/* Setup the DLL Object */
- LoadedServerDll->ApiBase = BASESRV_FIRST_API_NUMBER; // ApiNumberBase
- LoadedServerDll->HighestApiSupported = BasepMaxApiNumber; // MaxApiNumber
+ LoadedServerDll->ApiBase = BASESRV_FIRST_API_NUMBER;
+ LoadedServerDll->HighestApiSupported = BasepMaxApiNumber;
LoadedServerDll->DispatchTable = BaseServerApiDispatchTable;
LoadedServerDll->ValidTable = BaseServerApiServerValidTable;
LoadedServerDll->NameTable = BaseServerApiNameTable;
Modified: branches/ros-csrss/subsystems/win32/csrsrv/procsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrs…
==============================================================================
--- branches/ros-csrss/subsystems/win32/csrsrv/procsup.c [iso-8859-1] (original)
+++ branches/ros-csrss/subsystems/win32/csrsrv/procsup.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -1365,7 +1365,7 @@
return Status;
}
-/* FIXME: Temporary hack. This is really "CsrShutdownProcess", mostly. Used by
winsrv */
+/* HACK: Temporary hack. This is really "CsrShutdownProcesses", mostly. Used by
winsrv */
#if 0
NTSTATUS
WINAPI
Modified: branches/ros-csrss/subsystems/win32/csrsrv/server.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrs…
==============================================================================
--- branches/ros-csrss/subsystems/win32/csrsrv/server.c [iso-8859-1] (original)
+++ branches/ros-csrss/subsystems/win32/csrsrv/server.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -603,6 +603,8 @@
ULONG_PTR ErrorParameters[4];
ULONG Response;
+ DPRINT1("CsrUnhandledExceptionFilter called\n");
+
/* Check if a debugger is installed */
Status = NtQuerySystemInformation(SystemKernelDebuggerInformation,
&DebuggerInfo,
Modified: branches/ros-csrss/win32ss/user/consrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/coninput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/coninput.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -367,7 +367,7 @@
PVOID InputHandle = WaitArgument2;
- DPRINT1("ReadInputBufferThread - WaitContext = 0x%p, WaitArgument1 = 0x%p,
WaitArgument2 = 0x%p, WaitFlags = %lu\n", WaitContext, WaitArgument1, WaitArgument2,
WaitFlags);
+ DPRINT("ReadInputBufferThread - WaitContext = 0x%p, WaitArgument1 = 0x%p,
WaitArgument2 = 0x%p, WaitFlags = %lu\n", WaitContext, WaitArgument1, WaitArgument2,
WaitFlags);
/*
* If we are notified of the process termination via a call
@@ -500,7 +500,7 @@
PVOID InputHandle = WaitArgument2;
- DPRINT1("ReadCharsThread - WaitContext = 0x%p, WaitArgument1 = 0x%p,
WaitArgument2 = 0x%p, WaitFlags = %lu\n", WaitContext, WaitArgument1, WaitArgument2,
WaitFlags);
+ DPRINT("ReadCharsThread - WaitContext = 0x%p, WaitArgument1 = 0x%p,
WaitArgument2 = 0x%p, WaitFlags = %lu\n", WaitContext, WaitArgument1, WaitArgument2,
WaitFlags);
/*
* If we are notified of the process termination via a call
Modified: branches/ros-csrss/win32ss/user/consrv/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/conoutput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/conoutput.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -18,6 +18,12 @@
#define NDEBUG
#include <debug.h>
+
+/*
+// Define wmemset(...)
+#include <wchar.h>
+#define HAVE_WMEMSET
+*/
/* GLOBALS ********************************************************************/
@@ -598,7 +604,7 @@
{
NTSTATUS Status;
- DPRINT1("WriteConsoleThread - WaitContext = 0x%p, WaitArgument1 = 0x%p,
WaitArgument2 = 0x%p, WaitFlags = %lu\n", WaitContext, WaitArgument1, WaitArgument2,
WaitFlags);
+ DPRINT("WriteConsoleThread - WaitContext = 0x%p, WaitArgument1 = 0x%p,
WaitArgument2 = 0x%p, WaitFlags = %lu\n", WaitContext, WaitArgument1, WaitArgument2,
WaitFlags);
/*
* If we are notified of the process termination via a call
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] Sun Apr 14 12:14:00
2013
@@ -639,7 +639,7 @@
if (!GuiMode)
{
- DPRINT1("CONSRV: Opening text-mode terminal emulator\n");
+ DPRINT("CONSRV: Opening text-mode terminal emulator\n");
Status = TuiInitConsole(Console,
ConsoleStartInfo,
&ConsoleInfo,
@@ -663,7 +663,7 @@
*/
if (GuiMode)
{
- DPRINT1("CONSRV: Opening GUI-mode terminal emulator\n");
+ DPRINT("CONSRV: Opening GUI-mode terminal emulator\n");
Status = GuiInitConsole(Console,
ConsoleStartInfo,
&ConsoleInfo,
Modified: branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/f…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++ branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c [iso-8859-1] Sun Apr 14
12:14:00 2013
@@ -23,12 +23,6 @@
#define NDEBUG
#include <debug.h>
-
-/*
-// Define wmemset(...)
-#include <wchar.h>
-#define HAVE_WMEMSET
-*/
/* GUI Console Window Class name */
#define GUI_CONSOLE_WINDOW_CLASS L"ConsoleWindowClass"
Modified: branches/ros-csrss/win32ss/user/user32/misc/exit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/m…
==============================================================================
--- branches/ros-csrss/win32ss/user/user32/misc/exit.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/user32/misc/exit.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -76,7 +76,7 @@
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX,
UserpExitWindowsEx),
- sizeof(CSRSS_EXIT_REACTOS));
+ sizeof(USER_EXIT_REACTOS));
if (!NT_SUCCESS(Status))
{
SetLastError(RtlNtStatusToDosError(Status));
@@ -101,7 +101,7 @@
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX,
UserpRegisterServicesProcess),
- sizeof(CSRSS_REGISTER_SERVICES_PROCESS));
+ sizeof(USER_REGISTER_SERVICES_PROCESS));
if (!NT_SUCCESS(Status))
{
SetLastError(RtlNtStatusToDosError(Status));
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] Sun Apr 14 12:14:00
2013
@@ -55,7 +55,7 @@
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX,
UserpRegisterLogonProcess),
- sizeof(CSRSS_REGISTER_LOGON_PROCESS));
+ sizeof(USER_REGISTER_LOGON_PROCESS));
if (!NT_SUCCESS(Status))
{
ERR("Failed to register logon process with CSRSS\n");
Modified: branches/ros-csrss/win32ss/user/winsrv/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/C…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/CMakeLists.txt [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/CMakeLists.txt [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -19,7 +19,6 @@
set_module_type(winsrv win32dll UNICODE)
-# add_importlibs(winsrv psapi msvcrt kernel32 ntdll csrsrv)
add_importlibs(winsrv msvcrt kernel32 ntdll csrsrv)
add_delay_importlibs(winsrv user32 gdi32 advapi32)
Modified: branches/ros-csrss/win32ss/user/winsrv/harderror.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/h…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/harderror.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/harderror.c [iso-8859-1] Sun Apr 14 12:14:00
2013
@@ -23,7 +23,7 @@
static
NTSTATUS
-CsrpGetClientFileName(
+UserpGetClientFileName(
OUT PUNICODE_STRING ClientFileNameU,
HANDLE hProcess)
{
@@ -110,7 +110,7 @@
static
VOID
-CsrpFreeStringParameters(
+UserpFreeStringParameters(
IN OUT PULONG_PTR Parameters,
IN PHARDERROR_MSG HardErrorMessage)
{
@@ -130,7 +130,7 @@
static
NTSTATUS
-CsrpCaptureStringParameters(
+UserpCaptureStringParameters(
OUT PULONG_PTR Parameters,
OUT PULONG SizeOfAllUnicodeStrings,
IN PHARDERROR_MSG HardErrorMessage,
@@ -226,7 +226,7 @@
if (!NT_SUCCESS(Status))
{
- CsrpFreeStringParameters(Parameters, HardErrorMessage);
+ UserpFreeStringParameters(Parameters, HardErrorMessage);
return Status;
}
@@ -238,7 +238,7 @@
static
NTSTATUS
-CsrpFormatMessages(
+UserpFormatMessages(
OUT PUNICODE_STRING TextStringU,
OUT PUNICODE_STRING CaptionStringU,
IN PULONG_PTR Parameters,
@@ -254,7 +254,7 @@
ULONG Size, ExceptionCode;
/* Get the file name of the client process */
- CsrpGetClientFileName(&FileNameU, hProcess);
+ UserpGetClientFileName(&FileNameU, hProcess);
/* Check if we have a file name */
if (!FileNameU.Buffer)
@@ -440,7 +440,7 @@
static
ULONG
-CsrpMessageBox(
+UserpMessageBox(
PWSTR Text,
PWSTR Caption,
ULONG ValidResponseOptions,
@@ -547,7 +547,7 @@
}
/* Capture all string parameters from the process memory */
- Status = CsrpCaptureStringParameters(Parameters, &Size, Message, hProcess);
+ Status = UserpCaptureStringParameters(Parameters, &Size, Message, hProcess);
if (!NT_SUCCESS(Status))
{
NtClose(hProcess);
@@ -555,15 +555,15 @@
}
/* Format the caption and message box text */
- Status = CsrpFormatMessages(&TextU,
- &CaptionU,
- Parameters,
- Size,
- Message,
- hProcess);
+ Status = UserpFormatMessages(&TextU,
+ &CaptionU,
+ Parameters,
+ Size,
+ Message,
+ hProcess);
/* Cleanup */
- CsrpFreeStringParameters(Parameters, Message);
+ UserpFreeStringParameters(Parameters, Message);
NtClose(hProcess);
if (!NT_SUCCESS(Status))
@@ -572,10 +572,10 @@
}
/* Display the message box */
- Message->Response = CsrpMessageBox(TextU.Buffer,
- CaptionU.Buffer,
- Message->ValidResponseOptions,
- (ULONG)Message->Status >> 30);
+ Message->Response = UserpMessageBox(TextU.Buffer,
+ CaptionU.Buffer,
+ Message->ValidResponseOptions,
+ (ULONG)Message->Status >> 30);
RtlFreeUnicodeString(&TextU);
RtlFreeUnicodeString(&CaptionU);
Modified: branches/ros-csrss/win32ss/user/winsrv/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/i…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/init.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/init.c [iso-8859-1] Sun Apr 14 12:14:00 2013
@@ -191,13 +191,13 @@
}
/**********************************************************************
- * CsrpInitVideo/3
+ * UserpInitVideo
*
* TODO: we need a virtual device for sessions other than
* TODO: the console one
*/
NTSTATUS
-CsrpInitVideo(VOID)
+UserpInitVideo(VOID)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\??\\DISPLAY1");
@@ -270,7 +270,7 @@
UserServerHeap = RtlGetProcessHeap();
/* Initialize the video */
- CsrpInitVideo();
+ UserpInitVideo();
NtUserInitialize(0, NULL, NULL);
PrivateCsrssManualGuiCheck(0);
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] Sun Apr 14 12:14:00
2013
@@ -25,7 +25,7 @@
CSR_API(SrvRegisterLogonProcess)
{
- PCSRSS_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.RegisterLogonProcessRequest;
+ PUSER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.RegisterLogonProcessRequest;
if (RegisterLogonProcessRequest->Register)
{
@@ -51,7 +51,7 @@
CSR_API(SrvRegisterServicesProcess)
{
- PCSRSS_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.RegisterServicesProcessRequest;
+ PUSER_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.RegisterServicesProcessRequest;
if (ServicesProcessIdValid == TRUE)
{
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] Sun Apr 14 12:14:00
2013
@@ -4,6 +4,8 @@
* FILE: win32ss/user/winsrv/shutdown.c
* PURPOSE: Logout/shutdown
* PROGRAMMERS:
+ *
+ * NOTE: The shutdown code must be rewritten completely. (hbelusca)
*/
/* INCLUDES *******************************************************************/
@@ -915,7 +917,7 @@
CSR_API(SrvExitWindowsEx)
{
- PCSRSS_EXIT_REACTOS ExitReactosRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.ExitReactosRequest;
+ PUSER_EXIT_REACTOS ExitReactosRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.ExitReactosRequest;
if (0 == (ExitReactosRequest->Flags & EWX_INTERNAL_FLAG))
{