Author: hbelusca
Date: Sat Oct 27 23:52:28 2012
New Revision: 57628
URL:
http://svn.reactos.org/svn/reactos?rev=57628&view=rev
Log:
[WIN32SS/USER32]
- Use the new subsystems header winmsg.h
- Use the new USER_API_MESSAGE structure, and adapt co_CsrNotify in consequence.
- Code formatting.
[KERNEL32]
- Use the new subsystems headers basemsg.h, conmsg.h, winmsg.h, etc...
[NTDLL]
- Code formatting only.
Modified:
branches/ros-csrss/dll/ntdll/csr/connect.c
branches/ros-csrss/dll/win32/kernel32/k32.h
branches/ros-csrss/win32ss/pch.h
branches/ros-csrss/win32ss/user/ntuser/csr.c
branches/ros-csrss/win32ss/user/ntuser/csr.h
branches/ros-csrss/win32ss/user/ntuser/desktop.c
branches/ros-csrss/win32ss/user/ntuser/simplecall.c
branches/ros-csrss/win32ss/user/user32/include/user32.h
branches/ros-csrss/win32ss/user/user32/misc/exit.c
branches/ros-csrss/win32ss/user/user32/misc/misc.c
Modified: branches/ros-csrss/dll/ntdll/csr/connect.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/csr/connect…
==============================================================================
--- branches/ros-csrss/dll/ntdll/csr/connect.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/ntdll/csr/connect.c [iso-8859-1] Sat Oct 27 23:52:28 2012
@@ -60,7 +60,7 @@
ApiMessage->Header.u2.ZeroInit = 0;
ApiMessage->Header.u1.s1.TotalLength =
FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength;
- /* FIELD_OFFSET(CSR_API_MESSAGE, Data) <= sizeof(CSR_API_MESSAGE) -
sizeof(ApiMessage->Data) */
+ /* FIELD_OFFSET(CSR_API_MESSAGE, Data) <= sizeof(CSR_API_MESSAGE) -
sizeof(ApiMessage->Data) */
ApiMessage->Header.u1.s1.DataLength =
ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
Modified: branches/ros-csrss/dll/win32/kernel32/k32.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/k3…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/k32.h [iso-8859-1] (original)
+++ branches/ros-csrss/dll/win32/kernel32/k32.h [iso-8859-1] Sat Oct 27 23:52:28 2012
@@ -37,6 +37,10 @@
/* CSRSS Header */
#include <csr/csr.h>
+#include <win/base.h>
+#include <win/basemsg.h>
+#include <win/conmsg.h>
+#include <win/winmsg.h>
//#include <csr/csrss.h> // FIXME: data header.
/* C Headers */
Modified: branches/ros-csrss/win32ss/pch.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/pch.h?rev=576…
==============================================================================
--- branches/ros-csrss/win32ss/pch.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/pch.h [iso-8859-1] Sat Oct 27 23:52:28 2012
@@ -71,8 +71,8 @@
#include <pseh/pseh2.h>
/* CSRSS Header */
-#include <csrss/client.h>
-#include <csrss/csrss.h> // FIXME: data header.
+#include <csr/csr.h>
+#include <csr/csrss.h> // FIXME: data header.
/* Public Win32K headers */
#include <include/callback.h>
Modified: branches/ros-csrss/win32ss/user/ntuser/csr.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/csr.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/csr.c [iso-8859-1] Sat Oct 27 23:52:28 2012
@@ -46,46 +46,51 @@
NTSTATUS FASTCALL
-co_CsrNotify(PCSR_API_MESSAGE Request)
+co_CsrNotify(IN OUT PCSR_API_MESSAGE ApiMessage,
+ IN ULONG DataLength)
{
- NTSTATUS Status;
- PEPROCESS OldProcess;
+ NTSTATUS Status;
+ PEPROCESS OldProcess;
- if (NULL == CsrProcess)
- {
- return STATUS_INVALID_PORT_HANDLE;
- }
+ if (NULL == CsrProcess)
+ {
+ return STATUS_INVALID_PORT_HANDLE;
+ }
- Request->Header.u2.ZeroInit = 0;
- Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
- Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
+ /* Fill out the Port Message Header */
+ ApiMessage->Header.u2.ZeroInit = 0;
+ ApiMessage->Header.u1.s1.TotalLength =
+ FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength;
+ /* FIELD_OFFSET(CSR_API_MESSAGE, Data) <= sizeof(CSR_API_MESSAGE) -
sizeof(ApiMessage->Data) */
+ ApiMessage->Header.u1.s1.DataLength =
+ ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
- /* Switch to the process in which the WindowsApiPort handle is valid */
- OldProcess = PsGetCurrentProcess();
- if (CsrProcess != OldProcess)
- {
- KeAttachProcess(&CsrProcess->Pcb);
- }
+ /* Switch to the process in which the WindowsApiPort handle is valid */
+ OldProcess = PsGetCurrentProcess();
+ if (CsrProcess != OldProcess)
+ {
+ KeAttachProcess(&CsrProcess->Pcb);
+ }
- UserLeaveCo();
+ UserLeaveCo();
- Status = ZwRequestWaitReplyPort(WindowsApiPort,
- &Request->Header,
- &Request->Header);
+ Status = ZwRequestWaitReplyPort(WindowsApiPort,
+ &ApiMessage->Header,
+ &ApiMessage->Header);
- UserEnterCo();
+ UserEnterCo();
- if (CsrProcess != OldProcess)
- {
- KeDetachProcess();
- }
+ if (CsrProcess != OldProcess)
+ {
+ KeDetachProcess();
+ }
- if (NT_SUCCESS(Status))
- {
- Status = Request->Status;
- }
+ if (NT_SUCCESS(Status))
+ {
+ Status = ApiMessage->Status;
+ }
- return Status;
+ return Status;
}
Modified: branches/ros-csrss/win32ss/user/ntuser/csr.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/csr.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/csr.h [iso-8859-1] Sat Oct 27 23:52:28 2012
@@ -12,7 +12,8 @@
extern PEPROCESS CsrProcess;
NTSTATUS FASTCALL CsrInit(void);
-NTSTATUS FASTCALL co_CsrNotify(PCSR_API_MESSAGE Request);
+NTSTATUS FASTCALL co_CsrNotify(IN OUT PCSR_API_MESSAGE ApiMessage,
+ IN ULONG DataLength);
NTSTATUS FASTCALL CsrCloseHandle(HANDLE Handle);
NTSTATUS WINAPI CsrInsertObject(HANDLE ObjectHandle,
ACCESS_MASK DesiredAccess,
Modified: branches/ros-csrss/win32ss/user/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/d…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/desktop.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/desktop.c [iso-8859-1] Sat Oct 27 23:52:28
2012
@@ -1220,7 +1220,8 @@
RETURN( NULL);
}
- Status = co_CsrNotify(&Request);
+ Status = co_CsrNotify((PCSR_API_MESSAGE)&Request,
+ sizeof(CSR_API_MESSAGE));
if (! NT_SUCCESS(Status))
{
CsrCloseHandle(Request.Data.CreateDesktopRequest.DesktopHandle);
Modified: branches/ros-csrss/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/s…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/simplecall.c [iso-8859-1] Sat Oct 27 23:52:28
2012
@@ -17,7 +17,7 @@
{
PEPROCESS Process;
NTSTATUS Status;
- CSR_API_MESSAGE Request;
+ USER_API_MESSAGE Request;
Status = PsLookupProcessByProcessId(ProcessId,
&Process);
@@ -52,12 +52,13 @@
ObDereferenceObject(Process);
- Request.ApiNumber = CSR_CREATE_API_NUMBER(CSR_GUI, REGISTER_LOGON_PROCESS);
+ Request.ApiNumber = CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX,
UserpRegisterLogonProcess);
Request.Data.RegisterLogonProcessRequest.ProcessId = ProcessId;
Request.Data.RegisterLogonProcessRequest.Register = Register;
- Status = co_CsrNotify(&Request);
- if (! NT_SUCCESS(Status))
+ Status = co_CsrNotify((PCSR_API_MESSAGE)&Request,
+ sizeof(CSRSS_REGISTER_LOGON_PROCESS));
+ if (!NT_SUCCESS(Status))
{
ERR("Failed to register logon process with CSRSS\n");
return FALSE;
Modified: branches/ros-csrss/win32ss/user/user32/include/user32.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/i…
==============================================================================
--- branches/ros-csrss/win32ss/user/user32/include/user32.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/user32/include/user32.h [iso-8859-1] Sat Oct 27
23:52:28 2012
@@ -30,8 +30,8 @@
#include <ndk/umfuncs.h>
/* CSRSS Header */
-#include <csrss/client.h>
-#include <csrss/csrss.h> // FIXME: data header.
+#include <csr/csr.h>
+#include <win/winmsg.h>
/* Public Win32K Headers */
#include <ntusrtyp.h>
Modified: branches/ros-csrss/win32ss/user/user32/misc/exit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/m…
==============================================================================
--- branches/ros-csrss/win32ss/user/user32/misc/exit.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/user32/misc/exit.c [iso-8859-1] Sat Oct 27 23:52:28
2012
@@ -67,17 +67,17 @@
ExitWindowsEx(UINT uFlags,
DWORD dwReserved)
{
- CSR_API_MESSAGE Request;
+ USER_API_MESSAGE ApiMessage;
NTSTATUS Status;
- Request.Data.ExitReactosRequest.Flags = uFlags;
- Request.Data.ExitReactosRequest.Reserved = dwReserved;
+ ApiMessage.Data.ExitReactosRequest.Flags = uFlags;
+ ApiMessage.Data.ExitReactosRequest.Reserved = dwReserved;
- Status = CsrClientCallServer(&Request,
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
- CSR_CREATE_API_NUMBER(CSR_GUI, EXIT_REACTOS),
- sizeof(CSR_API_MESSAGE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
+ CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX,
UserpExitWindowsEx),
+ sizeof(CSRSS_EXIT_REACTOS));
+ if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
{
SetLastError(RtlNtStatusToDosError(Status));
return FALSE;
@@ -93,16 +93,16 @@
BOOL WINAPI
RegisterServicesProcess(DWORD ServicesProcessId)
{
- CSR_API_MESSAGE Request;
+ USER_API_MESSAGE ApiMessage;
NTSTATUS Status;
- Request.Data.RegisterServicesProcessRequest.ProcessId =
UlongToHandle(ServicesProcessId);
+ ApiMessage.Data.RegisterServicesProcessRequest.ProcessId =
UlongToHandle(ServicesProcessId);
- Status = CsrClientCallServer(&Request,
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
- CSR_CREATE_API_NUMBER(CSR_GUI,
REGISTER_SERVICES_PROCESS),
- sizeof(CSR_API_MESSAGE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
+ CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX,
UserpRegisterServicesProcess),
+ sizeof(CSRSS_REGISTER_SERVICES_PROCESS));
+ if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
{
SetLastError(RtlNtStatusToDosError(Status));
return FALSE;
Modified: branches/ros-csrss/win32ss/user/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/m…
==============================================================================
--- branches/ros-csrss/win32ss/user/user32/misc/misc.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/user32/misc/misc.c [iso-8859-1] Sat Oct 27 23:52:28
2012
@@ -42,7 +42,7 @@
WINAPI
RegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
{
- return NtUserxRegisterLogonProcess(dwProcessId,bRegister);
+ return NtUserxRegisterLogonProcess(dwProcessId, bRegister);
}
/*
@@ -50,7 +50,7 @@
*/
BOOL
WINAPI
-SetLogonNotifyWindow (HWND Wnd, HWINSTA WinSta)
+SetLogonNotifyWindow(HWND Wnd, HWINSTA WinSta)
{
/* Maybe we should call NtUserSetLogonNotifyWindow and let that one inform CSRSS???
*/
CSR_API_MESSAGE Request;