mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Implemented LPC sections
Changed WriteConsoleOutput to pass data in the section svn path=/trunk/; revision=2413
This commit is contained in:
@@ -74,11 +74,13 @@ typedef struct CSRSS_CONSOLE_t
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PCSRSS_CONSOLE Console;
|
||||
ULONG HandleTableSize;
|
||||
Object_t ** HandleTable;
|
||||
ULONG ProcessId;
|
||||
HANDLE ConsoleEvent;
|
||||
PCSRSS_CONSOLE Console;
|
||||
ULONG HandleTableSize;
|
||||
Object_t ** HandleTable;
|
||||
ULONG ProcessId;
|
||||
HANDLE ConsoleEvent;
|
||||
PVOID CsrSectionViewBase;
|
||||
ULONG CsrSectionViewSize;
|
||||
} CSRSS_PROCESS_DATA, *PCSRSS_PROCESS_DATA;
|
||||
|
||||
#define CSR_API(n) NTSTATUS n (\
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: conio.c,v 1.26 2001/11/20 02:29:45 dwelch Exp $
|
||||
/* $Id: conio.c,v 1.27 2001/12/02 23:34:43 dwelch Exp $
|
||||
*
|
||||
* reactos/subsys/csrss/api/conio.c
|
||||
*
|
||||
@@ -1689,6 +1689,7 @@ CSR_API(CsrWriteConsoleOutput)
|
||||
COORD BufferSize;
|
||||
NTSTATUS Status;
|
||||
DWORD Offset;
|
||||
DWORD PSize;
|
||||
|
||||
Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
|
||||
Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - sizeof(LPC_MESSAGE_HEADER);
|
||||
@@ -1702,8 +1703,17 @@ CSR_API(CsrWriteConsoleOutput)
|
||||
}
|
||||
|
||||
BufferSize = Request->Data.WriteConsoleOutputRequest.BufferSize;
|
||||
PSize = BufferSize.X * BufferSize.Y * sizeof(CHAR_INFO);
|
||||
BufferCoord = Request->Data.WriteConsoleOutputRequest.BufferCoord;
|
||||
CharInfo = (CHAR_INFO*)&Request->Data.WriteConsoleOutputRequest.CharInfo;
|
||||
CharInfo = Request->Data.WriteConsoleOutputRequest.CharInfo;
|
||||
if (((PVOID)CharInfo < ProcessData->CsrSectionViewBase) ||
|
||||
(((PVOID)CharInfo + PSize) >
|
||||
(ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
|
||||
{
|
||||
UNLOCK;
|
||||
Reply->Status = STATUS_ACCESS_VIOLATION;
|
||||
return(Reply->Status);
|
||||
}
|
||||
WriteRegion = Request->Data.WriteConsoleOutputRequest.WriteRegion;
|
||||
|
||||
SizeY = RtlMin(BufferSize.Y - BufferCoord.Y, CsrpRectHeight(WriteRegion));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: wapi.c,v 1.15 2001/09/01 15:36:45 chorns Exp $
|
||||
/* $Id: wapi.c,v 1.16 2001/12/02 23:34:43 dwelch Exp $
|
||||
*
|
||||
* reactos/subsys/csrss/api/wapi.c
|
||||
*
|
||||
@@ -113,11 +113,14 @@ void Thread_Api(PVOID PortHandle)
|
||||
LPC_MAX_MESSAGE Request;
|
||||
HANDLE ServerPort;
|
||||
HANDLE ServerThread;
|
||||
PCSRSS_PROCESS_DATA ProcessData;
|
||||
|
||||
CsrInitProcessData();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
LPC_SECTION_READ LpcRead;
|
||||
|
||||
Status = NtListenPort(PortHandle, &Request.Header);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
@@ -130,12 +133,16 @@ void Thread_Api(PVOID PortHandle)
|
||||
NULL,
|
||||
1,
|
||||
0,
|
||||
NULL);
|
||||
&LpcRead);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DisplayString(L"CSR: NtAcceptConnectPort() failed\n");
|
||||
NtTerminateThread(NtCurrentThread(), Status);
|
||||
}
|
||||
|
||||
ProcessData = CsrGetProcessData(Request.Header.Cid.UniqueProcess);
|
||||
ProcessData->CsrSectionViewBase = LpcRead.ViewBase;
|
||||
ProcessData->CsrSectionViewSize = LpcRead.ViewSize;
|
||||
|
||||
Status = NtCompleteConnectPort(ServerPort);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: init.c,v 1.26 2001/07/15 13:46:16 ekohl Exp $
|
||||
/* $Id: init.c,v 1.27 2001/12/02 23:34:43 dwelch Exp $
|
||||
*
|
||||
* init.c - Session Manager initialization
|
||||
*
|
||||
@@ -448,7 +448,7 @@ BOOL InitSessionManager (HANDLE Children[])
|
||||
/* Load the kernel mode driver win32k.sys */
|
||||
RtlInitUnicodeString (&CmdLineW,
|
||||
L"\\SystemRoot\\system32\\drivers\\win32k.sys");
|
||||
Status = NtLoadDriver (&CmdLineW);
|
||||
// Status = NtLoadDriver (&CmdLineW);
|
||||
|
||||
#if 0
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
||||
Reference in New Issue
Block a user