- Fix some comments.
- Remove unuseful DPRINTs and just shut-up some DPRINT1s.
- Rename remaining CSRSS_*** structures.
svn path=/branches/ros-csrss/; revision=58753
}
}
- // if (res == IDC_RADIO_APPLY_ALL || res == IDC_RADIO_APPLY_CURRENT)
if (SetParams)
{
HANDLE hSection;
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;
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
/*
* 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@relsoft.net)
*/
/*
* 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@relsoft.net)
*/
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;
/*
* 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@relsoft.net)
*/
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;
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)
{
/*
}
}
- /* 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)
{
/*
}
}
- /* Check for success. */
+ /* Check for success */
if (!NT_SUCCESS(Status))
{
/* We failed. Overwrite the return value with the failure. */
/* 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. */
}
}
- /* Return the CSR Result. */
+ /* Return the CSR Result */
DPRINT("Got back: 0x%lx\n", ApiMessage->Status);
return ApiMessage->Status;
}
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");
* \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
* \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
}
/* Connect to the base server */
- DPRINT("Connecting to CSR in DllMain...\n");
Status = CsrClientConnectToServer(SessionDir,
BASESRV_SERVERDLL_INDEX,
&Dummy,
NtTerminateProcess(NtCurrentProcess(), Status);
return FALSE;
}
- DPRINT("kernel32 DllMain - OK, connection succeeded\n");
/* Get the server data */
ASSERT(Peb->ReadOnlyStaticServerData);
/* 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! */
}
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 */
/*
* 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)
{
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 */
}
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",
/*
-typedef union _CSR_API_NUMBER
+typedef struct _CSR_API_NUMBER
{
WORD Index;
WORD Subsystem;
#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"
IN BOOLEAN FirstPhase
);
+// See http://redplait.blogspot.fr/2011/07/csrserverdll.html
typedef struct _CSR_SERVER_DLL
{
ULONG Length;
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;
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];
CsrValidateMessageString(IN PCSR_API_MESSAGE ApiMessage,
IN LPWSTR *MessageString);
-/*
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-*/
-
#endif // _CSRSRV_H
/* EOF */
/*
* 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@sfr.fr)
/*
* 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
PCSR_CAPTURE_BUFFER CsrCaptureData;
CSR_API_NUMBER ApiNumber;
- NTSTATUS Status; // ReturnValue;
+ NTSTATUS Status;
ULONG Reserved;
union
{
/*
* 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
/* 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;
{
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;
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;
PCSR_CAPTURE_BUFFER CsrCaptureData;
CSR_API_NUMBER ApiNumber;
- NTSTATUS Status; // ReturnValue;
+ NTSTATUS Status;
ULONG Reserved;
union
{
/*
* 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@sfr.fr)
/*
* 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
{
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
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;
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,
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,
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,
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;
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
ULONG_PTR ErrorParameters[4];
ULONG Response;
+ DPRINT1("CsrUnhandledExceptionFilter called\n");
+
/* Check if a debugger is installed */
Status = NtQuerySystemInformation(SystemKernelDebuggerInformation,
&DebuggerInfo,
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
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
#define NDEBUG
#include <debug.h>
+/*
+// Define wmemset(...)
+#include <wchar.h>
+#define HAVE_WMEMSET
+*/
+
/* GLOBALS ********************************************************************/
{
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
if (!GuiMode)
{
- DPRINT1("CONSRV: Opening text-mode terminal emulator\n");
+ DPRINT("CONSRV: Opening text-mode terminal emulator\n");
Status = TuiInitConsole(Console,
ConsoleStartInfo,
&ConsoleInfo,
*/
if (GuiMode)
{
- DPRINT1("CONSRV: Opening GUI-mode terminal emulator\n");
+ DPRINT("CONSRV: Opening GUI-mode terminal emulator\n");
Status = GuiInitConsole(Console,
ConsoleStartInfo,
&ConsoleInfo,
#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"
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));
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));
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");
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)
static
NTSTATUS
-CsrpGetClientFileName(
+UserpGetClientFileName(
OUT PUNICODE_STRING ClientFileNameU,
HANDLE hProcess)
{
static
VOID
-CsrpFreeStringParameters(
+UserpFreeStringParameters(
IN OUT PULONG_PTR Parameters,
IN PHARDERROR_MSG HardErrorMessage)
{
static
NTSTATUS
-CsrpCaptureStringParameters(
+UserpCaptureStringParameters(
OUT PULONG_PTR Parameters,
OUT PULONG SizeOfAllUnicodeStrings,
IN PHARDERROR_MSG HardErrorMessage,
if (!NT_SUCCESS(Status))
{
- CsrpFreeStringParameters(Parameters, HardErrorMessage);
+ UserpFreeStringParameters(Parameters, HardErrorMessage);
return Status;
}
static
NTSTATUS
-CsrpFormatMessages(
+UserpFormatMessages(
OUT PUNICODE_STRING TextStringU,
OUT PUNICODE_STRING CaptionStringU,
IN PULONG_PTR Parameters,
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)
static
ULONG
-CsrpMessageBox(
+UserpMessageBox(
PWSTR Text,
PWSTR Caption,
ULONG ValidResponseOptions,
}
/* 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);
}
/* 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))
}
/* 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);
}
/**********************************************************************
- * 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");
UserServerHeap = RtlGetProcessHeap();
/* Initialize the video */
- CsrpInitVideo();
+ UserpInitVideo();
NtUserInitialize(0, NULL, NULL);
PrivateCsrssManualGuiCheck(0);
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)
{
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)
{
* FILE: win32ss/user/winsrv/shutdown.c
* PURPOSE: Logout/shutdown
* PROGRAMMERS:
+ *
+ * NOTE: The shutdown code must be rewritten completely. (hbelusca)
*/
/* INCLUDES *******************************************************************/
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))
{