Author: ion
Date: Sun Feb 19 03:51:36 2012
New Revision: 55696
URL:
http://svn.reactos.org/svn/reactos?rev=55696&view=rev
Log:
[CSRSRV/WIN32CSR]: Remove all the code that was setting new values for
DataLength/TotalLength in the LPC header. I have no idea why the code was doing this. I
suspect it's partly to blame for why changing the structures of the CSRSS messages
caused bizarre failures. Perhaps this behavior was needed with the original winsock-based
LPC implementation that I rewrote back in 2006?
Modified:
trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c
trunk/reactos/subsystems/win32/csrss/csrsrv/api/user.c
trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c
trunk/reactos/subsystems/win32/csrss/win32csr/conoutput.c
trunk/reactos/subsystems/win32/csrss/win32csr/console.c
trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c
trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c
trunk/reactos/subsystems/win32/csrss/win32csr/handle.c
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -141,9 +141,6 @@
{
PCSR_PROCESS NewProcessData;
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
-
NewProcessData =
CsrCreateProcessData(Request->Data.CreateProcessRequest.NewProcessId);
if (NewProcessData == NULL)
{
@@ -177,9 +174,6 @@
NTSTATUS Status;
PCSR_PROCESS CsrProcess;
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
CurrentThread = NtCurrentTeb()->CsrClientThread;
CsrProcess = CurrentThread->Process;
@@ -230,8 +224,6 @@
{
PLIST_ENTRY NextEntry;
PCSR_THREAD Thread;
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
LOCK;
@@ -254,16 +246,12 @@
CSR_API(CsrConnectProcess)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
return(STATUS_SUCCESS);
}
CSR_API(CsrGetShutdownParameters)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
Request->Data.GetShutdownParametersRequest.Level = ProcessData->ShutdownLevel;
Request->Data.GetShutdownParametersRequest.Flags = ProcessData->ShutdownFlags;
@@ -273,8 +261,6 @@
CSR_API(CsrSetShutdownParameters)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
ProcessData->ShutdownLevel = Request->Data.SetShutdownParametersRequest.Level;
ProcessData->ShutdownFlags = Request->Data.SetShutdownParametersRequest.Flags;
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/user.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/user.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/user.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -26,9 +26,6 @@
CSR_API(CsrRegisterServicesProcess)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
-
if (ServicesProcessIdValid == TRUE)
{
/* Only accept a single call */
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -92,8 +92,6 @@
}
}
DPRINT1("CSR: Unknown request type 0x%x\n", Request->Type);
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
Request->Status = STATUS_INVALID_SYSTEM_SERVICE;
}
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -38,8 +38,6 @@
CharSize = (Request->Data.ReadConsoleRequest.Unicode ? sizeof(WCHAR) :
sizeof(CHAR));
nNumberOfCharsToRead = Request->Data.ReadConsoleRequest.NrCharactersToRead;
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Buffer = (PCHAR)Request->Data.ReadConsoleRequest.Buffer;
UnicodeBuffer = (PWCHAR)Buffer;
@@ -432,8 +430,6 @@
DPRINT("CsrReadInputEvent\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Request->Data.ReadInputRequest.Event = ProcessData->ConsoleEvent;
Status = ConioLockConsole(ProcessData,
Request->Data.ReadInputRequest.ConsoleHandle, &Console, GENERIC_READ);
@@ -494,8 +490,6 @@
DPRINT("CsrFlushInputBuffer\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioLockConsole(ProcessData,
Request->Data.FlushInputBufferRequest.ConsoleInput,
&Console,
@@ -528,9 +522,6 @@
DWORD NumEvents;
DPRINT("CsrGetNumberOfConsoleInputEvents\n");
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = Request->Header.u1.s1.TotalLength -
sizeof(PORT_MESSAGE);
Status = ConioLockConsole(ProcessData,
Request->Data.GetNumInputEventsRequest.ConsoleHandle, &Console, GENERIC_READ);
if (! NT_SUCCESS(Status))
@@ -567,9 +558,6 @@
DPRINT("CsrPeekConsoleInput\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockConsole(ProcessData,
Request->Data.GetNumInputEventsRequest.ConsoleHandle, &Console, GENERIC_READ);
if(! NT_SUCCESS(Status))
{
@@ -625,9 +613,6 @@
DPRINT("CsrWriteConsoleInput\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockConsole(ProcessData,
Request->Data.WriteConsoleInputRequest.ConsoleHandle, &Console, GENERIC_WRITE);
if (! NT_SUCCESS(Status))
{
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/conoutput.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/conoutput.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -371,13 +371,8 @@
+ (Request->Data.WriteConsoleRequest.NrCharactersToWrite * CharSize))
{
DPRINT1("Invalid request size\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
return STATUS_INVALID_PARAMETER;
}
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.WriteConsoleRequest.ConsoleHandle, &Buff, GENERIC_WRITE);
if (! NT_SUCCESS(Status))
@@ -481,9 +476,6 @@
PCONSOLE_SCREEN_BUFFER_INFO pInfo;
DPRINT("CsrGetScreenBufferInfo\n");
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.ScreenBufferInfoRequest.ConsoleHandle, &Buff, GENERIC_READ);
if (! NT_SUCCESS(Status))
@@ -518,9 +510,6 @@
DPRINT("CsrSetCursor\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.SetCursorRequest.ConsoleHandle, &Buff, GENERIC_WRITE);
if (! NT_SUCCESS(Status))
{
@@ -600,8 +589,6 @@
+ (Request->Data.WriteConsoleOutputCharRequest.Length * CharSize))
{
DPRINT1("Invalid request size\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
return STATUS_INVALID_PARAMETER;
}
@@ -609,8 +596,6 @@
Request->Data.WriteConsoleOutputCharRequest.ConsoleHandle,
&Buff,
GENERIC_WRITE);
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
if (NT_SUCCESS(Status))
{
Console = Buff->Header.Console;
@@ -695,9 +680,6 @@
DPRINT("CsrFillOutputChar\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.FillOutputRequest.ConsoleHandle, &Buff, GENERIC_WRITE);
if (! NT_SUCCESS(Status))
{
@@ -759,13 +741,8 @@
+ Request->Data.WriteConsoleOutputAttribRequest.Length * sizeof(WORD))
{
DPRINT1("Invalid request size\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
return STATUS_INVALID_PARAMETER;
}
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.WriteConsoleOutputAttribRequest.ConsoleHandle,
@@ -824,8 +801,6 @@
DPRINT("CsrFillOutputAttrib\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.FillOutputAttribRequest.ConsoleHandle, &Buff, GENERIC_WRITE);
if (! NT_SUCCESS(Status))
{
@@ -882,9 +857,6 @@
DPRINT("CsrGetCursorInfo\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.GetCursorInfoRequest.ConsoleHandle, &Buff, GENERIC_READ);
if (! NT_SUCCESS(Status))
{
@@ -906,9 +878,6 @@
NTSTATUS Status;
DPRINT("CsrSetCursorInfo\n");
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.SetCursorInfoRequest.ConsoleHandle, &Buff, GENERIC_WRITE);
if (! NT_SUCCESS(Status))
@@ -990,9 +959,6 @@
{
return Status;
}
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Buff = HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, sizeof(CSRSS_SCREEN_BUFFER));
@@ -1050,9 +1016,6 @@
DPRINT("CsrSetScreenBuffer\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.SetScreenBufferRequest.OutputHandle, &Buff, GENERIC_WRITE);
if (! NT_SUCCESS(Status))
{
@@ -1097,8 +1060,6 @@
DPRINT("CsrWriteConsoleOutput\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.WriteConsoleOutputRequest.ConsoleHandle,
&Buff,
@@ -1193,8 +1154,6 @@
DestinationOrigin =
Request->Data.ScrollConsoleScreenBufferRequest.DestinationOrigin;
Fill = Request->Data.ScrollConsoleScreenBufferRequest.Fill;
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioLockScreenBuffer(ProcessData, ConsoleHandle, &Buff,
GENERIC_WRITE);
if (! NT_SUCCESS(Status))
{
@@ -1277,8 +1236,6 @@
DPRINT("CsrReadConsoleOutputChar\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = Request->Header.u1.s1.TotalLength -
sizeof(PORT_MESSAGE);
ReadBuffer = Request->Data.ReadConsoleOutputCharRequest.String;
CharSize = (Request->Data.ReadConsoleOutputCharRequest.Unicode ? sizeof(WCHAR) :
sizeof(CHAR));
@@ -1328,8 +1285,8 @@
Request->Data.ReadConsoleOutputCharRequest.CharsRead =
(DWORD)((ULONG_PTR)ReadBuffer -
(ULONG_PTR)Request->Data.ReadConsoleOutputCharRequest.String) / CharSize;
if (Request->Data.ReadConsoleOutputCharRequest.CharsRead * CharSize +
CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE_OUTPUT_CHAR) > sizeof(CSR_API_MESSAGE))
{
- Request->Header.u1.s1.TotalLength =
Request->Data.ReadConsoleOutputCharRequest.CharsRead * CharSize +
CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE_OUTPUT_CHAR);
- Request->Header.u1.s1.DataLength = Request->Header.u1.s1.TotalLength -
sizeof(PORT_MESSAGE);
+ DPRINT1("Length won't fit in message\n");
+ return STATUS_BUFFER_TOO_SMALL;
}
return STATUS_SUCCESS;
@@ -1347,8 +1304,6 @@
DPRINT("CsrReadConsoleOutputAttrib\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = Request->Header.u1.s1.TotalLength -
sizeof(PORT_MESSAGE);
ReadBuffer = Request->Data.ReadConsoleOutputAttribRequest.Attribute;
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.ReadConsoleOutputAttribRequest.ConsoleHandle, &Buff, GENERIC_READ);
@@ -1390,8 +1345,8 @@
+ Request->Data.ReadConsoleOutputAttribRequest.NumAttrsToRead *
sizeof(WORD);
if (CurrentLength > sizeof(CSR_API_MESSAGE))
{
- Request->Header.u1.s1.TotalLength = CurrentLength;
- Request->Header.u1.s1.DataLength = CurrentLength - sizeof(PORT_MESSAGE);
+ DPRINT1("Length won't fit in message\n");
+ return STATUS_BUFFER_TOO_SMALL;
}
return STATUS_SUCCESS;
@@ -1415,9 +1370,6 @@
DPRINT("CsrReadConsoleOutput\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.ReadConsoleOutputRequest.ConsoleHandle, &Buff, GENERIC_READ);
if (! NT_SUCCESS(Status))
{
@@ -1489,9 +1441,6 @@
PCSRSS_CONSOLE Console;
PCSRSS_SCREEN_BUFFER Buff;
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockScreenBuffer(ProcessData,
Request->Data.SetScreenBufferSize.OutputHandle, &Buff, GENERIC_WRITE);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/console.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/console.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -180,9 +180,6 @@
DPRINT("CsrAllocConsole\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
if (ProcessData->Console)
{
@@ -316,9 +313,6 @@
CSR_API(CsrFreeConsole)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
return Win32CsrReleaseConsole(ProcessData, 0, 0);
}
@@ -395,8 +389,6 @@
DPRINT("CsrSetConsoleMode\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = Win32CsrLockObject(ProcessData,
Request->Data.SetConsoleModeRequest.ConsoleHandle,
(Object_t **) &Console, GENERIC_WRITE, 0);
@@ -432,8 +424,6 @@
DPRINT("CsrGetConsoleMode\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = Win32CsrLockObject(ProcessData,
Request->Data.GetConsoleModeRequest.ConsoleHandle,
(Object_t **) &Console, GENERIC_READ, 0);
if (! NT_SUCCESS(Status))
@@ -467,8 +457,6 @@
DPRINT("CsrSetTitle\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
if (!Win32CsrValidateBuffer(ProcessData, Request->Data.SetTitleRequest.Title,
Request->Data.SetTitleRequest.Length, 1))
{
@@ -513,8 +501,6 @@
DPRINT("CsrGetTitle\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
if (!Win32CsrValidateBuffer(ProcessData, Request->Data.GetTitleRequest.Title,
Request->Data.GetTitleRequest.Length, 1))
@@ -585,9 +571,6 @@
DPRINT("CsrHardwareStateProperty\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioLockConsole(ProcessData,
Request->Data.ConsoleHardwareStateRequest.ConsoleHandle,
&Console,
@@ -626,9 +609,6 @@
DPRINT("CsrGetConsoleWindow\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioConsoleFromProcessData(ProcessData, &Console);
if (! NT_SUCCESS(Status))
{
@@ -647,9 +627,6 @@
NTSTATUS Status;
DPRINT("CsrSetConsoleIcon\n");
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioConsoleFromProcessData(ProcessData, &Console);
if (! NT_SUCCESS(Status))
@@ -677,8 +654,6 @@
return Status;
}
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Request->Data.GetConsoleCodePage.CodePage = Console->CodePage;
ConioUnlockConsole(Console);
return STATUS_SUCCESS;
@@ -696,9 +671,6 @@
{
return Status;
}
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
{
@@ -724,8 +696,6 @@
return Status;
}
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Request->Data.GetConsoleOutputCodePage.CodePage = Console->OutputCodePage;
ConioUnlockConsole(Console);
return STATUS_SUCCESS;
@@ -743,9 +713,6 @@
{
return Status;
}
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
if (IsValidCodePage(Request->Data.SetConsoleOutputCodePage.CodePage))
{
@@ -769,9 +736,6 @@
DPRINT("CsrGetProcessList\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Buffer = Request->Data.GetProcessListRequest.ProcessId;
if (!Win32CsrValidateBuffer(ProcessData, Buffer,
Request->Data.GetProcessListRequest.nMaxIds, sizeof(DWORD)))
return STATUS_ACCESS_VIOLATION;
@@ -806,9 +770,6 @@
PLIST_ENTRY current_entry;
DWORD Group;
NTSTATUS Status;
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Status = ConioConsoleFromProcessData(ProcessData, &Console);
if (! NT_SUCCESS(Status))
@@ -840,9 +801,6 @@
NTSTATUS Status;
PCSRSS_CONSOLE Console;
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Status = ConioConsoleFromProcessData(ProcessData, &Console);
if (NT_SUCCESS(Status))
{
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -213,9 +213,6 @@
DPRINT("CsrCreateDesktop\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
if (!BgInitialized)
{
BgInitialized = TRUE;
@@ -265,9 +262,6 @@
PRIVATE_NOTIFY_DESKTOP nmh;
DPRINT("CsrShowDesktop\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
nmh.hdr.hwndFrom = Request->Data.ShowDesktopRequest.DesktopWindow;
nmh.hdr.idFrom = 0;
nmh.hdr.code = PM_SHOW_DESKTOP;
@@ -291,9 +285,6 @@
PRIVATE_NOTIFY_DESKTOP nmh;
DPRINT("CsrHideDesktop\n");
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
nmh.hdr.hwndFrom = Request->Data.ShowDesktopRequest.DesktopWindow;
nmh.hdr.idFrom = 0;
nmh.hdr.code = PM_HIDE_DESKTOP;
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -18,9 +18,6 @@
CSR_API(CsrRegisterLogonProcess)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
if (Request->Data.RegisterLogonProcessRequest.Register)
{
if (0 != LogonProcess)
@@ -46,10 +43,6 @@
CSR_API(CsrSetLogonNotifyWindow)
{
DWORD WindowCreator;
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
- sizeof(PORT_MESSAGE);
if (0 ==
GetWindowThreadProcessId(Request->Data.SetLogonNotifyWindowRequest.LogonNotifyWindow,
&WindowCreator))
@@ -922,10 +915,6 @@
CSR_API(CsrExitReactos)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
- sizeof(PORT_MESSAGE);
-
if (0 == (Request->Data.ExitReactosRequest.Flags & EWX_INTERNAL_FLAG))
{
return UserExitReactos((DWORD_PTR) Request->Header.ClientId.UniqueProcess,
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/handle.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/handle.c [iso-8859-1] Sun Feb 19
03:51:36 2012
@@ -263,9 +263,6 @@
{
NTSTATUS Status = STATUS_SUCCESS;
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Request->Data.GetInputHandleRequest.Handle = INVALID_HANDLE_VALUE;
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
@@ -309,9 +306,6 @@
CSR_API(CsrCloseHandle)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
return Win32CsrReleaseObject(ProcessData,
Request->Data.CloseHandleRequest.Handle);
}
@@ -319,9 +313,6 @@
{
ULONG_PTR Index;
NTSTATUS Status = STATUS_SUCCESS;
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Index = (ULONG_PTR)Request->Data.VerifyHandleRequest.Handle >> 2;
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
@@ -341,9 +332,6 @@
ULONG_PTR Index;
PCSRSS_HANDLE Entry;
DWORD DesiredAccess;
-
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
Index = (ULONG_PTR)Request->Data.DuplicateHandleRequest.Handle >> 2;
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
@@ -390,9 +378,6 @@
CSR_API(CsrGetInputWaitHandle)
{
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
-
Request->Data.GetConsoleInputWaitHandle.InputWaitHandle =
ProcessData->ConsoleEvent;
return STATUS_SUCCESS;
}