mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 03:52:17 +00:00
[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. svn path=/branches/ros-csrss/; revision=58753
This commit is contained in:
parent
8b4f636332
commit
57d6853ca4
31 changed files with 117 additions and 132 deletions
|
@ -196,7 +196,6 @@ ApplyConsoleInfo(HWND hwndDlg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (res == IDC_RADIO_APPLY_ALL || res == IDC_RADIO_APPLY_CURRENT)
|
|
||||||
if (SetParams)
|
if (SetParams)
|
||||||
{
|
{
|
||||||
HANDLE hSection;
|
HANDLE hSection;
|
||||||
|
@ -290,10 +289,6 @@ InitApplet(HWND hWnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (IsBadReadPtr((PVOID)pSharedInfo, sizeof(CONSOLE_PROPS)))
|
|
||||||
// {
|
|
||||||
// }
|
|
||||||
|
|
||||||
/* Find the console window and whether we must use default parameters */
|
/* Find the console window and whether we must use default parameters */
|
||||||
pConInfo->hConsoleWindow = pSharedInfo->hConsoleWindow;
|
pConInfo->hConsoleWindow = pSharedInfo->hConsoleWindow;
|
||||||
pConInfo->ShowDefaultParams = pSharedInfo->ShowDefaultParams;
|
pConInfo->ShowDefaultParams = pSharedInfo->ShowDefaultParams;
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
|
|
||||||
const TCHAR szPreviewText[] =
|
const TCHAR szPreviewText[] =
|
||||||
_T("C:\\ReactOS> dir \n") \
|
_T("C:\\ReactOS> dir \n") \
|
||||||
_T("SYSTEM <DIR> 03-03-13 5:00a\n") \
|
_T("SYSTEM <DIR> 03-04-15 5:00a\n") \
|
||||||
_T("SYSTEM32 <DIR> 03-03-13 5:00a\n") \
|
_T("SYSTEM32 <DIR> 03-04-15 5:00a\n") \
|
||||||
_T("readme txt 1739 03-03-13 5:00a\n") \
|
_T("readme txt 1739 03-04-15 5:00a\n") \
|
||||||
_T("explorer exe 3329536 03-03-13 5:00a\n") \
|
_T("explorer exe 3329536 03-04-15 5:00a\n") \
|
||||||
_T("vgafonts cab 18736 03-03-13 5:00a\n") \
|
_T("vgafonts cab 18736 03-04-15 5:00a\n") \
|
||||||
_T("setuplog txt 313 03-03-13 5:00a\n") \
|
_T("setuplog txt 313 03-04-15 5:00a\n") \
|
||||||
_T("win ini 7005 03-03-13 5:00a\n");
|
_T("win ini 7005 03-04-15 5:00a\n");
|
||||||
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: lib/ntdll/csr/api.c
|
* FILE: dll/ntdll/csr/api.c
|
||||||
* PURPOSE: CSR APIs exported through NTDLL
|
* PURPOSE: CSR APIs exported through NTDLL
|
||||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: lib/ntdll/csr/capture.c
|
* FILE: dll/ntdll/csr/capture.c
|
||||||
* PURPOSE: Routines for probing and capturing CSR API Messages
|
* PURPOSE: Routines for probing and capturing CSR API Messages
|
||||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||||
*/
|
*/
|
||||||
|
@ -94,7 +94,8 @@ CsrAllocateCaptureBuffer(IN ULONG ArgumentCount,
|
||||||
if (BufferSize >= MAXLONG) return NULL;
|
if (BufferSize >= MAXLONG) return NULL;
|
||||||
|
|
||||||
/* Add the size of the header and for each offset to the pointers */
|
/* 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 */
|
/* Align it to a 4-byte boundary */
|
||||||
BufferSize = (BufferSize + 3) & ~3;
|
BufferSize = (BufferSize + 3) & ~3;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: lib/ntdll/csr/connect.c
|
* FILE: dll/ntdll/csr/connect.c
|
||||||
* PURPOSE: Routines for connecting and calling CSR
|
* PURPOSE: Routines for connecting and calling CSR
|
||||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||||
*/
|
*/
|
||||||
|
@ -54,14 +54,14 @@ CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage,
|
||||||
ULONG PointerCount;
|
ULONG PointerCount;
|
||||||
PULONG_PTR OffsetPointer;
|
PULONG_PTR OffsetPointer;
|
||||||
|
|
||||||
/* Fill out the Port Message Header. */
|
/* Fill out the Port Message Header */
|
||||||
ApiMessage->Header.u2.ZeroInit = 0;
|
ApiMessage->Header.u2.ZeroInit = 0;
|
||||||
ApiMessage->Header.u1.s1.TotalLength =
|
ApiMessage->Header.u1.s1.TotalLength =
|
||||||
FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength;
|
FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength;
|
||||||
ApiMessage->Header.u1.s1.DataLength =
|
ApiMessage->Header.u1.s1.DataLength =
|
||||||
ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
|
ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
|
||||||
|
|
||||||
/* Fill out the CSR Header. */
|
/* Fill out the CSR Header */
|
||||||
ApiMessage->ApiNumber = ApiNumber;
|
ApiMessage->ApiNumber = ApiNumber;
|
||||||
ApiMessage->CsrCaptureData = NULL;
|
ApiMessage->CsrCaptureData = NULL;
|
||||||
|
|
||||||
|
@ -70,10 +70,10 @@ CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage,
|
||||||
ApiMessage->Header.u1.s1.DataLength,
|
ApiMessage->Header.u1.s1.DataLength,
|
||||||
ApiMessage->Header.u1.s1.TotalLength);
|
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)
|
if (!InsideCsrProcess)
|
||||||
{
|
{
|
||||||
/* Check if we got a Capture Buffer. */
|
/* Check if we got a Capture Buffer */
|
||||||
if (CaptureBuffer)
|
if (CaptureBuffer)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -104,12 +104,12 @@ CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send the LPC Message. */
|
/* Send the LPC Message */
|
||||||
Status = NtRequestWaitReplyPort(CsrApiPort,
|
Status = NtRequestWaitReplyPort(CsrApiPort,
|
||||||
&ApiMessage->Header,
|
&ApiMessage->Header,
|
||||||
&ApiMessage->Header);
|
&ApiMessage->Header);
|
||||||
|
|
||||||
/* Check if we got a Capture Buffer. */
|
/* Check if we got a Capture Buffer */
|
||||||
if (CaptureBuffer)
|
if (CaptureBuffer)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -137,7 +137,7 @@ CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for success. */
|
/* Check for success */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* We failed. Overwrite the return value with the failure. */
|
/* We failed. Overwrite the return value with the failure. */
|
||||||
|
@ -150,13 +150,13 @@ CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage,
|
||||||
/* This is a server-to-server call. Save our CID and do a direct call. */
|
/* This is a server-to-server call. Save our CID and do a direct call. */
|
||||||
DPRINT1("Next gen server-to-server call\n");
|
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;
|
ApiMessage->Header.ClientId = NtCurrentTeb()->ClientId;
|
||||||
|
|
||||||
Status = CsrServerApiRoutine(&ApiMessage->Header,
|
Status = CsrServerApiRoutine(&ApiMessage->Header,
|
||||||
&ApiMessage->Header);
|
&ApiMessage->Header);
|
||||||
|
|
||||||
/* Check for success. */
|
/* Check for success */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* We failed. Overwrite the return value with the failure. */
|
/* We failed. Overwrite the return value with the failure. */
|
||||||
|
@ -164,7 +164,7 @@ CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the CSR Result. */
|
/* Return the CSR Result */
|
||||||
DPRINT("Got back: 0x%lx\n", ApiMessage->Status);
|
DPRINT("Got back: 0x%lx\n", ApiMessage->Status);
|
||||||
return ApiMessage->Status;
|
return ApiMessage->Status;
|
||||||
}
|
}
|
||||||
|
@ -404,7 +404,8 @@ CsrClientConnectToServer(IN PWSTR ObjectDirectory,
|
||||||
if (!CsrApiPort)
|
if (!CsrApiPort)
|
||||||
{
|
{
|
||||||
/* No, set it up now */
|
/* No, set it up now */
|
||||||
if (!NT_SUCCESS(Status = CsrpConnectToServer(ObjectDirectory)))
|
Status = CsrpConnectToServer(ObjectDirectory);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* Failed */
|
/* Failed */
|
||||||
DPRINT1("Failure to connect to CSR\n");
|
DPRINT1("Failure to connect to CSR\n");
|
||||||
|
|
|
@ -2227,8 +2227,8 @@ SetConsoleInputExeNameA(LPCSTR lpInputExeName)
|
||||||
* \name GetConsoleInputExeNameW
|
* \name GetConsoleInputExeNameW
|
||||||
* \brief Retrieves the console input file name as unicode string.
|
* \brief Retrieves the console input file name as unicode string.
|
||||||
* \param nBufferLength Length of the buffer in WCHARs.
|
* \param nBufferLength Length of the buffer in WCHARs.
|
||||||
* Specify 0 to recieve the needed buffer length.
|
* Specify 0 to receive the needed buffer length.
|
||||||
* \param lpBuffer Pointer to a buffer that recieves the string.
|
* \param lpBuffer Pointer to a buffer that receives the string.
|
||||||
* \return Needed buffer size if \p nBufferLength is 0.
|
* \return Needed buffer size if \p nBufferLength is 0.
|
||||||
* Otherwise 1 if successful, 2 if buffer is too small.
|
* Otherwise 1 if successful, 2 if buffer is too small.
|
||||||
* \remarks Sets last error value to ERROR_BUFFER_OVERFLOW if the buffer
|
* \remarks Sets last error value to ERROR_BUFFER_OVERFLOW if the buffer
|
||||||
|
@ -2274,10 +2274,10 @@ GetConsoleInputExeNameW(DWORD nBufferLength, LPWSTR lpBuffer)
|
||||||
* \name GetConsoleInputExeNameA
|
* \name GetConsoleInputExeNameA
|
||||||
* \brief Retrieves the console input file name as ansi string.
|
* \brief Retrieves the console input file name as ansi string.
|
||||||
* \param nBufferLength Length of the buffer in CHARs.
|
* \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.
|
* \return 1 if successful, 2 if buffer is too small.
|
||||||
* \remarks Sets last error value to ERROR_BUFFER_OVERFLOW if the buffer
|
* \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
|
DWORD
|
||||||
WINAPI
|
WINAPI
|
||||||
|
|
|
@ -134,7 +134,6 @@ DllMain(HANDLE hDll,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Connect to the base server */
|
/* Connect to the base server */
|
||||||
DPRINT("Connecting to CSR in DllMain...\n");
|
|
||||||
Status = CsrClientConnectToServer(SessionDir,
|
Status = CsrClientConnectToServer(SessionDir,
|
||||||
BASESRV_SERVERDLL_INDEX,
|
BASESRV_SERVERDLL_INDEX,
|
||||||
&Dummy,
|
&Dummy,
|
||||||
|
@ -146,7 +145,6 @@ DllMain(HANDLE hDll,
|
||||||
NtTerminateProcess(NtCurrentProcess(), Status);
|
NtTerminateProcess(NtCurrentProcess(), Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
DPRINT("kernel32 DllMain - OK, connection succeeded\n");
|
|
||||||
|
|
||||||
/* Get the server data */
|
/* Get the server data */
|
||||||
ASSERT(Peb->ReadOnlyStaticServerData);
|
ASSERT(Peb->ReadOnlyStaticServerData);
|
||||||
|
@ -214,13 +212,11 @@ DllMain(HANDLE hDll,
|
||||||
|
|
||||||
/* Insert more dll attach stuff here! */
|
/* Insert more dll attach stuff here! */
|
||||||
DllInitialized = TRUE;
|
DllInitialized = TRUE;
|
||||||
DPRINT("Initialization complete\n");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
{
|
{
|
||||||
DPRINT("DLL_PROCESS_DETACH\n");
|
|
||||||
if (DllInitialized == TRUE)
|
if (DllInitialized == TRUE)
|
||||||
{
|
{
|
||||||
/* Insert more dll detach stuff here! */
|
/* Insert more dll detach stuff here! */
|
||||||
|
|
|
@ -1430,7 +1430,7 @@ SearchPathW(IN LPCWSTR lpPath,
|
||||||
}
|
}
|
||||||
|
|
||||||
Quickie:
|
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))
|
if ((PathString.Buffer != lpPath) && (PathString.Buffer))
|
||||||
{
|
{
|
||||||
/* And free it */
|
/* And free it */
|
||||||
|
|
|
@ -581,7 +581,7 @@ BasepCreateFirstThread(HANDLE ProcessHandle,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For GUI applications we turn on the 2nd bit. This also allows
|
* 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)
|
if (IMAGE_SUBSYSTEM_WINDOWS_GUI == SectionImageInfo->SubSystemType)
|
||||||
{
|
{
|
||||||
|
@ -1856,7 +1856,7 @@ FatalAppExitW(IN UINT uAction,
|
||||||
ULONG Response;
|
ULONG Response;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
/* Setup the stirng to print out */
|
/* Setup the string to print out */
|
||||||
RtlInitUnicodeString(&UnicodeString, lpMessageText);
|
RtlInitUnicodeString(&UnicodeString, lpMessageText);
|
||||||
|
|
||||||
/* Display the hard error no matter what */
|
/* Display the hard error no matter what */
|
||||||
|
|
|
@ -233,7 +233,7 @@ BaseGetVdmConfigInfo(IN LPCWSTR Reserved,
|
||||||
}
|
}
|
||||||
else
|
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,
|
_snwprintf(CommandLine,
|
||||||
sizeof(CommandLine),
|
sizeof(CommandLine),
|
||||||
L"\"%s\\ntvdm.exe\" %s%c",
|
L"\"%s\\ntvdm.exe\" %s%c",
|
||||||
|
|
|
@ -33,7 +33,7 @@ typedef enum _CSRSRV_API_NUMBER
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
typedef union _CSR_API_NUMBER
|
typedef struct _CSR_API_NUMBER
|
||||||
{
|
{
|
||||||
WORD Index;
|
WORD Index;
|
||||||
WORD Subsystem;
|
WORD Subsystem;
|
||||||
|
|
|
@ -10,15 +10,6 @@
|
||||||
#ifndef _CSRSRV_H
|
#ifndef _CSRSRV_H
|
||||||
#define _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"
|
#include "csrmsg.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -213,6 +204,7 @@ ULONG
|
||||||
IN BOOLEAN FirstPhase
|
IN BOOLEAN FirstPhase
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// See http://redplait.blogspot.fr/2011/07/csrserverdll.html
|
||||||
typedef struct _CSR_SERVER_DLL
|
typedef struct _CSR_SERVER_DLL
|
||||||
{
|
{
|
||||||
ULONG Length;
|
ULONG Length;
|
||||||
|
@ -221,8 +213,8 @@ typedef struct _CSR_SERVER_DLL
|
||||||
HANDLE ServerHandle;
|
HANDLE ServerHandle;
|
||||||
ULONG ServerId;
|
ULONG ServerId;
|
||||||
ULONG Unknown;
|
ULONG Unknown;
|
||||||
ULONG ApiBase; // ApiNumberBase
|
ULONG ApiBase;
|
||||||
ULONG HighestApiSupported; // MaxApiNumber
|
ULONG HighestApiSupported;
|
||||||
PCSR_API_ROUTINE *DispatchTable;
|
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.
|
PBOOLEAN ValidTable; // Table of booleans which describe whether or not a server function call is valid when it is called via CsrCallServerFromServer.
|
||||||
PCHAR *NameTable;
|
PCHAR *NameTable;
|
||||||
|
@ -230,7 +222,7 @@ typedef struct _CSR_SERVER_DLL
|
||||||
PCSR_CONNECT_CALLBACK ConnectCallback;
|
PCSR_CONNECT_CALLBACK ConnectCallback;
|
||||||
PCSR_DISCONNECT_CALLBACK DisconnectCallback;
|
PCSR_DISCONNECT_CALLBACK DisconnectCallback;
|
||||||
PCSR_HARDERROR_CALLBACK HardErrorCallback;
|
PCSR_HARDERROR_CALLBACK HardErrorCallback;
|
||||||
PVOID SharedSection; // SharedStaticServerData
|
PVOID SharedSection;
|
||||||
PCSR_NEWPROCESS_CALLBACK NewProcessCallback;
|
PCSR_NEWPROCESS_CALLBACK NewProcessCallback;
|
||||||
PCSR_SHUTDOWNPROCESS_CALLBACK ShutdownProcessCallback;
|
PCSR_SHUTDOWNPROCESS_CALLBACK ShutdownProcessCallback;
|
||||||
ULONG Unknown2[3];
|
ULONG Unknown2[3];
|
||||||
|
@ -419,12 +411,6 @@ NTAPI
|
||||||
CsrValidateMessageString(IN PCSR_API_MESSAGE ApiMessage,
|
CsrValidateMessageString(IN PCSR_API_MESSAGE ApiMessage,
|
||||||
IN LPWSTR *MessageString);
|
IN LPWSTR *MessageString);
|
||||||
|
|
||||||
/*
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
#endif // _CSRSRV_H
|
#endif // _CSRSRV_H
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* 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
|
* FILE: include/reactos/subsys/win/base.h
|
||||||
* PURPOSE: Public definitions for Base API Clients
|
* PURPOSE: Public definitions for Base API Clients
|
||||||
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
|
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* 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
|
* FILE: include/reactos/subsys/win/basemsg.h
|
||||||
* PURPOSE: Public definitions for communication
|
* PURPOSE: Public definitions for communication
|
||||||
* between Base API Clients and Servers
|
* between Base API Clients and Servers
|
||||||
|
@ -184,7 +184,7 @@ typedef struct _BASE_API_MESSAGE
|
||||||
|
|
||||||
PCSR_CAPTURE_BUFFER CsrCaptureData;
|
PCSR_CAPTURE_BUFFER CsrCaptureData;
|
||||||
CSR_API_NUMBER ApiNumber;
|
CSR_API_NUMBER ApiNumber;
|
||||||
NTSTATUS Status; // ReturnValue;
|
NTSTATUS Status;
|
||||||
ULONG Reserved;
|
ULONG Reserved;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* 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
|
* FILE: include/reactos/subsys/win/conmsg.h
|
||||||
* PURPOSE: Public definitions for communication
|
* PURPOSE: Public definitions for communication
|
||||||
* between Console API Clients and Servers
|
* between Console API Clients and Servers
|
||||||
|
@ -131,7 +131,7 @@ typedef struct _CONSOLE_CONNECTION_INFO
|
||||||
/* Adapted from CONSOLE_ALLOCCONSOLE */
|
/* Adapted from CONSOLE_ALLOCCONSOLE */
|
||||||
CONSOLE_START_INFO ConsoleStartInfo;
|
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 InputHandle;
|
||||||
HANDLE OutputHandle;
|
HANDLE OutputHandle;
|
||||||
HANDLE ErrorHandle;
|
HANDLE ErrorHandle;
|
||||||
|
@ -180,7 +180,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
PCONSOLE_START_INFO ConsoleStartInfo;
|
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 InputHandle;
|
||||||
HANDLE OutputHandle;
|
HANDLE OutputHandle;
|
||||||
HANDLE ErrorHandle;
|
HANDLE ErrorHandle;
|
||||||
|
@ -192,7 +192,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
DWORD ProcessId; // If ProcessId == ATTACH_PARENT_PROCESS == -1, then attach the current process to its parent process console.
|
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 InputHandle;
|
||||||
HANDLE OutputHandle;
|
HANDLE OutputHandle;
|
||||||
HANDLE ErrorHandle;
|
HANDLE ErrorHandle;
|
||||||
|
@ -585,7 +585,7 @@ typedef struct _CONSOLE_API_MESSAGE
|
||||||
|
|
||||||
PCSR_CAPTURE_BUFFER CsrCaptureData;
|
PCSR_CAPTURE_BUFFER CsrCaptureData;
|
||||||
CSR_API_NUMBER ApiNumber;
|
CSR_API_NUMBER ApiNumber;
|
||||||
NTSTATUS Status; // ReturnValue;
|
NTSTATUS Status;
|
||||||
ULONG Reserved;
|
ULONG Reserved;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* 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
|
* FILE: include/reactos/subsys/win/console.h
|
||||||
* PURPOSE: Public definitions for Console API Clients
|
* PURPOSE: Public definitions for Console API Clients
|
||||||
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
|
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* 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
|
* FILE: include/reactos/subsys/win/winmsg.h
|
||||||
* PURPOSE: Public definitions for communication
|
* PURPOSE: Public definitions for communication
|
||||||
* between User-Mode API Clients and Servers
|
* between User-Mode API Clients and Servers
|
||||||
|
@ -40,18 +40,18 @@ typedef struct
|
||||||
{
|
{
|
||||||
UINT Flags;
|
UINT Flags;
|
||||||
DWORD Reserved;
|
DWORD Reserved;
|
||||||
} CSRSS_EXIT_REACTOS, *PCSRSS_EXIT_REACTOS;
|
} USER_EXIT_REACTOS, *PUSER_EXIT_REACTOS;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
ULONG_PTR ProcessId;
|
ULONG_PTR ProcessId;
|
||||||
} CSRSS_REGISTER_SERVICES_PROCESS, *PCSRSS_REGISTER_SERVICES_PROCESS;
|
} USER_REGISTER_SERVICES_PROCESS, *PUSER_REGISTER_SERVICES_PROCESS;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
ULONG_PTR ProcessId;
|
ULONG_PTR ProcessId;
|
||||||
BOOL Register;
|
BOOL Register;
|
||||||
} CSRSS_REGISTER_LOGON_PROCESS, *PCSRSS_REGISTER_LOGON_PROCESS;
|
} USER_REGISTER_LOGON_PROCESS, *PUSER_REGISTER_LOGON_PROCESS;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _USER_API_MESSAGE
|
typedef struct _USER_API_MESSAGE
|
||||||
|
@ -60,13 +60,13 @@ typedef struct _USER_API_MESSAGE
|
||||||
|
|
||||||
PCSR_CAPTURE_BUFFER CsrCaptureData;
|
PCSR_CAPTURE_BUFFER CsrCaptureData;
|
||||||
CSR_API_NUMBER ApiNumber;
|
CSR_API_NUMBER ApiNumber;
|
||||||
NTSTATUS Status; // ReturnValue;
|
NTSTATUS Status;
|
||||||
ULONG Reserved;
|
ULONG Reserved;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
CSRSS_EXIT_REACTOS ExitReactosRequest;
|
USER_EXIT_REACTOS ExitReactosRequest;
|
||||||
CSRSS_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest;
|
USER_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest;
|
||||||
CSRSS_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest;
|
USER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest;
|
||||||
} Data;
|
} Data;
|
||||||
} USER_API_MESSAGE, *PUSER_API_MESSAGE;
|
} USER_API_MESSAGE, *PUSER_API_MESSAGE;
|
||||||
|
|
||||||
|
|
|
@ -138,16 +138,19 @@ CreateBaseAcls(OUT PACL* Dacl,
|
||||||
SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY};
|
SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY};
|
||||||
SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY};
|
SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY};
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
// UCHAR KeyValueBuffer[0x40];
|
#if 0 // Unused code
|
||||||
// PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo;
|
UCHAR KeyValueBuffer[0x40];
|
||||||
// UNICODE_STRING KeyName;
|
PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo;
|
||||||
// ULONG ProtectionMode = 0;
|
UNICODE_STRING KeyName;
|
||||||
ULONG AclLength; // , ResultLength;
|
ULONG ProtectionMode = 0;
|
||||||
// HANDLE hKey;
|
#endif
|
||||||
// OBJECT_ATTRIBUTES ObjectAttributes;
|
ULONG AclLength;
|
||||||
|
#if 0 // Unused code
|
||||||
|
ULONG ResultLength;
|
||||||
|
HANDLE hKey;
|
||||||
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
|
|
||||||
/* Open the Session Manager Key */
|
/* Open the Session Manager Key */
|
||||||
/*
|
|
||||||
RtlInitUnicodeString(&KeyName, SM_REG_KEY);
|
RtlInitUnicodeString(&KeyName, SM_REG_KEY);
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&KeyName,
|
&KeyName,
|
||||||
|
@ -157,7 +160,7 @@ CreateBaseAcls(OUT PACL* Dacl,
|
||||||
Status = NtOpenKey(&hKey, KEY_READ, &ObjectAttributes);
|
Status = NtOpenKey(&hKey, KEY_READ, &ObjectAttributes);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/\* Read the key value *\/
|
/* Read the key value */
|
||||||
RtlInitUnicodeString(&KeyName, L"ProtectionMode");
|
RtlInitUnicodeString(&KeyName, L"ProtectionMode");
|
||||||
Status = NtQueryValueKey(hKey,
|
Status = NtQueryValueKey(hKey,
|
||||||
&KeyName,
|
&KeyName,
|
||||||
|
@ -166,19 +169,19 @@ CreateBaseAcls(OUT PACL* Dacl,
|
||||||
sizeof(KeyValueBuffer),
|
sizeof(KeyValueBuffer),
|
||||||
&ResultLength);
|
&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;
|
KeyValuePartialInfo = (PKEY_VALUE_PARTIAL_INFORMATION)KeyValueBuffer;
|
||||||
if ((NT_SUCCESS(Status)) && (KeyValuePartialInfo->Type == REG_DWORD) &&
|
if ((NT_SUCCESS(Status)) && (KeyValuePartialInfo->Type == REG_DWORD) &&
|
||||||
(*(PULONG)KeyValuePartialInfo->Data))
|
(*(PULONG)KeyValuePartialInfo->Data))
|
||||||
{
|
{
|
||||||
/\* Save the Protection Mode *\/
|
/* Save the Protection Mode */
|
||||||
// ProtectionMode = *(PULONG)KeyValuePartialInfo->Data;
|
ProtectionMode = *(PULONG)KeyValuePartialInfo->Data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/\* Close the handle *\/
|
/* Close the handle */
|
||||||
NtClose(hKey);
|
NtClose(hKey);
|
||||||
}
|
}
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
/* Allocate the System SID */
|
/* Allocate the System SID */
|
||||||
Status = RtlAllocateAndInitializeSid(&NtAuthority,
|
Status = RtlAllocateAndInitializeSid(&NtAuthority,
|
||||||
|
@ -520,8 +523,8 @@ BaseInitializeStaticServerData(IN PCSR_SERVER_DLL LoadedServerDll)
|
||||||
CSR_SERVER_DLL_INIT(ServerDllInitialization)
|
CSR_SERVER_DLL_INIT(ServerDllInitialization)
|
||||||
{
|
{
|
||||||
/* Setup the DLL Object */
|
/* Setup the DLL Object */
|
||||||
LoadedServerDll->ApiBase = BASESRV_FIRST_API_NUMBER; // ApiNumberBase
|
LoadedServerDll->ApiBase = BASESRV_FIRST_API_NUMBER;
|
||||||
LoadedServerDll->HighestApiSupported = BasepMaxApiNumber; // MaxApiNumber
|
LoadedServerDll->HighestApiSupported = BasepMaxApiNumber;
|
||||||
LoadedServerDll->DispatchTable = BaseServerApiDispatchTable;
|
LoadedServerDll->DispatchTable = BaseServerApiDispatchTable;
|
||||||
LoadedServerDll->ValidTable = BaseServerApiServerValidTable;
|
LoadedServerDll->ValidTable = BaseServerApiServerValidTable;
|
||||||
LoadedServerDll->NameTable = BaseServerApiNameTable;
|
LoadedServerDll->NameTable = BaseServerApiNameTable;
|
||||||
|
|
|
@ -1365,7 +1365,7 @@ Quickie:
|
||||||
return Status;
|
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
|
#if 0
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
WINAPI
|
WINAPI
|
||||||
|
|
|
@ -603,6 +603,8 @@ CsrUnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo)
|
||||||
ULONG_PTR ErrorParameters[4];
|
ULONG_PTR ErrorParameters[4];
|
||||||
ULONG Response;
|
ULONG Response;
|
||||||
|
|
||||||
|
DPRINT1("CsrUnhandledExceptionFilter called\n");
|
||||||
|
|
||||||
/* Check if a debugger is installed */
|
/* Check if a debugger is installed */
|
||||||
Status = NtQuerySystemInformation(SystemKernelDebuggerInformation,
|
Status = NtQuerySystemInformation(SystemKernelDebuggerInformation,
|
||||||
&DebuggerInfo,
|
&DebuggerInfo,
|
||||||
|
|
|
@ -367,7 +367,7 @@ ReadInputBufferThread(IN PLIST_ENTRY WaitList,
|
||||||
|
|
||||||
PVOID InputHandle = WaitArgument2;
|
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
|
* If we are notified of the process termination via a call
|
||||||
|
@ -500,7 +500,7 @@ ReadCharsThread(IN PLIST_ENTRY WaitList,
|
||||||
|
|
||||||
PVOID InputHandle = WaitArgument2;
|
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
|
* If we are notified of the process termination via a call
|
||||||
|
|
|
@ -19,6 +19,12 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Define wmemset(...)
|
||||||
|
#include <wchar.h>
|
||||||
|
#define HAVE_WMEMSET
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* GLOBALS ********************************************************************/
|
/* GLOBALS ********************************************************************/
|
||||||
|
|
||||||
|
@ -598,7 +604,7 @@ WriteConsoleThread(IN PLIST_ENTRY WaitList,
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
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 we are notified of the process termination via a call
|
||||||
|
|
|
@ -639,7 +639,7 @@ ConSrvInitConsole(OUT PCONSOLE* NewConsole,
|
||||||
|
|
||||||
if (!GuiMode)
|
if (!GuiMode)
|
||||||
{
|
{
|
||||||
DPRINT1("CONSRV: Opening text-mode terminal emulator\n");
|
DPRINT("CONSRV: Opening text-mode terminal emulator\n");
|
||||||
Status = TuiInitConsole(Console,
|
Status = TuiInitConsole(Console,
|
||||||
ConsoleStartInfo,
|
ConsoleStartInfo,
|
||||||
&ConsoleInfo,
|
&ConsoleInfo,
|
||||||
|
@ -663,7 +663,7 @@ ConSrvInitConsole(OUT PCONSOLE* NewConsole,
|
||||||
*/
|
*/
|
||||||
if (GuiMode)
|
if (GuiMode)
|
||||||
{
|
{
|
||||||
DPRINT1("CONSRV: Opening GUI-mode terminal emulator\n");
|
DPRINT("CONSRV: Opening GUI-mode terminal emulator\n");
|
||||||
Status = GuiInitConsole(Console,
|
Status = GuiInitConsole(Console,
|
||||||
ConsoleStartInfo,
|
ConsoleStartInfo,
|
||||||
&ConsoleInfo,
|
&ConsoleInfo,
|
||||||
|
|
|
@ -24,12 +24,6 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
/*
|
|
||||||
// Define wmemset(...)
|
|
||||||
#include <wchar.h>
|
|
||||||
#define HAVE_WMEMSET
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* GUI Console Window Class name */
|
/* GUI Console Window Class name */
|
||||||
#define GUI_CONSOLE_WINDOW_CLASS L"ConsoleWindowClass"
|
#define GUI_CONSOLE_WINDOW_CLASS L"ConsoleWindowClass"
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ ExitWindowsEx(UINT uFlags,
|
||||||
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
||||||
NULL,
|
NULL,
|
||||||
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpExitWindowsEx),
|
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpExitWindowsEx),
|
||||||
sizeof(CSRSS_EXIT_REACTOS));
|
sizeof(USER_EXIT_REACTOS));
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastError(RtlNtStatusToDosError(Status));
|
||||||
|
@ -101,7 +101,7 @@ RegisterServicesProcess(DWORD ServicesProcessId)
|
||||||
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
||||||
NULL,
|
NULL,
|
||||||
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterServicesProcess),
|
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterServicesProcess),
|
||||||
sizeof(CSRSS_REGISTER_SERVICES_PROCESS));
|
sizeof(USER_REGISTER_SERVICES_PROCESS));
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastError(RtlNtStatusToDosError(Status));
|
||||||
|
|
|
@ -55,7 +55,7 @@ RegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
|
||||||
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
|
||||||
NULL,
|
NULL,
|
||||||
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterLogonProcess),
|
CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterLogonProcess),
|
||||||
sizeof(CSRSS_REGISTER_LOGON_PROCESS));
|
sizeof(USER_REGISTER_LOGON_PROCESS));
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ERR("Failed to register logon process with CSRSS\n");
|
ERR("Failed to register logon process with CSRSS\n");
|
||||||
|
|
|
@ -19,7 +19,6 @@ target_link_libraries(winsrv win32ksys ${PSEH_LIB}) # win32ksys because of NtUse
|
||||||
|
|
||||||
set_module_type(winsrv win32dll UNICODE)
|
set_module_type(winsrv win32dll UNICODE)
|
||||||
|
|
||||||
# add_importlibs(winsrv psapi msvcrt kernel32 ntdll csrsrv)
|
|
||||||
add_importlibs(winsrv msvcrt kernel32 ntdll csrsrv)
|
add_importlibs(winsrv msvcrt kernel32 ntdll csrsrv)
|
||||||
add_delay_importlibs(winsrv user32 gdi32 advapi32)
|
add_delay_importlibs(winsrv user32 gdi32 advapi32)
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
static
|
static
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
CsrpGetClientFileName(
|
UserpGetClientFileName(
|
||||||
OUT PUNICODE_STRING ClientFileNameU,
|
OUT PUNICODE_STRING ClientFileNameU,
|
||||||
HANDLE hProcess)
|
HANDLE hProcess)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,7 @@ CsrpGetClientFileName(
|
||||||
|
|
||||||
static
|
static
|
||||||
VOID
|
VOID
|
||||||
CsrpFreeStringParameters(
|
UserpFreeStringParameters(
|
||||||
IN OUT PULONG_PTR Parameters,
|
IN OUT PULONG_PTR Parameters,
|
||||||
IN PHARDERROR_MSG HardErrorMessage)
|
IN PHARDERROR_MSG HardErrorMessage)
|
||||||
{
|
{
|
||||||
|
@ -130,7 +130,7 @@ CsrpFreeStringParameters(
|
||||||
|
|
||||||
static
|
static
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
CsrpCaptureStringParameters(
|
UserpCaptureStringParameters(
|
||||||
OUT PULONG_PTR Parameters,
|
OUT PULONG_PTR Parameters,
|
||||||
OUT PULONG SizeOfAllUnicodeStrings,
|
OUT PULONG SizeOfAllUnicodeStrings,
|
||||||
IN PHARDERROR_MSG HardErrorMessage,
|
IN PHARDERROR_MSG HardErrorMessage,
|
||||||
|
@ -226,7 +226,7 @@ CsrpCaptureStringParameters(
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
CsrpFreeStringParameters(Parameters, HardErrorMessage);
|
UserpFreeStringParameters(Parameters, HardErrorMessage);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ CsrpCaptureStringParameters(
|
||||||
|
|
||||||
static
|
static
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
CsrpFormatMessages(
|
UserpFormatMessages(
|
||||||
OUT PUNICODE_STRING TextStringU,
|
OUT PUNICODE_STRING TextStringU,
|
||||||
OUT PUNICODE_STRING CaptionStringU,
|
OUT PUNICODE_STRING CaptionStringU,
|
||||||
IN PULONG_PTR Parameters,
|
IN PULONG_PTR Parameters,
|
||||||
|
@ -254,7 +254,7 @@ CsrpFormatMessages(
|
||||||
ULONG Size, ExceptionCode;
|
ULONG Size, ExceptionCode;
|
||||||
|
|
||||||
/* Get the file name of the client process */
|
/* Get the file name of the client process */
|
||||||
CsrpGetClientFileName(&FileNameU, hProcess);
|
UserpGetClientFileName(&FileNameU, hProcess);
|
||||||
|
|
||||||
/* Check if we have a file name */
|
/* Check if we have a file name */
|
||||||
if (!FileNameU.Buffer)
|
if (!FileNameU.Buffer)
|
||||||
|
@ -440,7 +440,7 @@ CsrpFormatMessages(
|
||||||
|
|
||||||
static
|
static
|
||||||
ULONG
|
ULONG
|
||||||
CsrpMessageBox(
|
UserpMessageBox(
|
||||||
PWSTR Text,
|
PWSTR Text,
|
||||||
PWSTR Caption,
|
PWSTR Caption,
|
||||||
ULONG ValidResponseOptions,
|
ULONG ValidResponseOptions,
|
||||||
|
@ -547,7 +547,7 @@ UserServerHardError(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Capture all string parameters from the process memory */
|
/* Capture all string parameters from the process memory */
|
||||||
Status = CsrpCaptureStringParameters(Parameters, &Size, Message, hProcess);
|
Status = UserpCaptureStringParameters(Parameters, &Size, Message, hProcess);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
NtClose(hProcess);
|
NtClose(hProcess);
|
||||||
|
@ -555,15 +555,15 @@ UserServerHardError(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Format the caption and message box text */
|
/* Format the caption and message box text */
|
||||||
Status = CsrpFormatMessages(&TextU,
|
Status = UserpFormatMessages(&TextU,
|
||||||
&CaptionU,
|
&CaptionU,
|
||||||
Parameters,
|
Parameters,
|
||||||
Size,
|
Size,
|
||||||
Message,
|
Message,
|
||||||
hProcess);
|
hProcess);
|
||||||
|
|
||||||
/* Cleanup */
|
/* Cleanup */
|
||||||
CsrpFreeStringParameters(Parameters, Message);
|
UserpFreeStringParameters(Parameters, Message);
|
||||||
NtClose(hProcess);
|
NtClose(hProcess);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -572,10 +572,10 @@ UserServerHardError(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Display the message box */
|
/* Display the message box */
|
||||||
Message->Response = CsrpMessageBox(TextU.Buffer,
|
Message->Response = UserpMessageBox(TextU.Buffer,
|
||||||
CaptionU.Buffer,
|
CaptionU.Buffer,
|
||||||
Message->ValidResponseOptions,
|
Message->ValidResponseOptions,
|
||||||
(ULONG)Message->Status >> 30);
|
(ULONG)Message->Status >> 30);
|
||||||
|
|
||||||
RtlFreeUnicodeString(&TextU);
|
RtlFreeUnicodeString(&TextU);
|
||||||
RtlFreeUnicodeString(&CaptionU);
|
RtlFreeUnicodeString(&CaptionU);
|
||||||
|
|
|
@ -191,13 +191,13 @@ InitializeVideoAddressSpace(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* CsrpInitVideo/3
|
* UserpInitVideo
|
||||||
*
|
*
|
||||||
* TODO: we need a virtual device for sessions other than
|
* TODO: we need a virtual device for sessions other than
|
||||||
* TODO: the console one
|
* TODO: the console one
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
CsrpInitVideo(VOID)
|
UserpInitVideo(VOID)
|
||||||
{
|
{
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\??\\DISPLAY1");
|
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\??\\DISPLAY1");
|
||||||
|
@ -270,7 +270,7 @@ CSR_SERVER_DLL_INIT(UserServerDllInitialization)
|
||||||
UserServerHeap = RtlGetProcessHeap();
|
UserServerHeap = RtlGetProcessHeap();
|
||||||
|
|
||||||
/* Initialize the video */
|
/* Initialize the video */
|
||||||
CsrpInitVideo();
|
UserpInitVideo();
|
||||||
NtUserInitialize(0, NULL, NULL);
|
NtUserInitialize(0, NULL, NULL);
|
||||||
PrivateCsrssManualGuiCheck(0);
|
PrivateCsrssManualGuiCheck(0);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ ULONG_PTR LogonProcessId = 0;
|
||||||
|
|
||||||
CSR_API(SrvRegisterLogonProcess)
|
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)
|
if (RegisterLogonProcessRequest->Register)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ CSR_API(SrvRegisterLogonProcess)
|
||||||
|
|
||||||
CSR_API(SrvRegisterServicesProcess)
|
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)
|
if (ServicesProcessIdValid == TRUE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* FILE: win32ss/user/winsrv/shutdown.c
|
* FILE: win32ss/user/winsrv/shutdown.c
|
||||||
* PURPOSE: Logout/shutdown
|
* PURPOSE: Logout/shutdown
|
||||||
* PROGRAMMERS:
|
* PROGRAMMERS:
|
||||||
|
*
|
||||||
|
* NOTE: The shutdown code must be rewritten completely. (hbelusca)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* INCLUDES *******************************************************************/
|
/* INCLUDES *******************************************************************/
|
||||||
|
@ -915,7 +917,7 @@ UserExitReactos(DWORD UserProcessId, UINT Flags)
|
||||||
|
|
||||||
CSR_API(SrvExitWindowsEx)
|
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))
|
if (0 == (ExitReactosRequest->Flags & EWX_INTERNAL_FLAG))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue