Author: hbelusca
Date: Fri Nov 2 13:50:31 2012
New Revision: 57665
URL:
http://svn.reactos.org/svn/reactos?rev=57665&view=rev
Log:
[WIN32K]
- Remove the now unneeded CSR messaging support.
- CsrInit() goes away also and the usage of the CsrProcess is replaced by that of
gpepCSRSS.
[WINSRV]
- Use a DLL instance for loading resources, instead of calling GetModuleHandle.
[KERNEL32/NTDLL]
- Remove unneeded variables.
Removed:
branches/ros-csrss/win32ss/user/ntuser/csr.c
branches/ros-csrss/win32ss/user/ntuser/csr.h
Modified:
branches/ros-csrss/dll/ntdll/include/ntdllp.h
branches/ros-csrss/dll/win32/kernel32/include/kernel32.h
branches/ros-csrss/win32ss/CMakeLists.txt
branches/ros-csrss/win32ss/gdi/ntgdi/gdikdbgext.c
branches/ros-csrss/win32ss/user/ntuser/desktop.c
branches/ros-csrss/win32ss/user/ntuser/hook.c
branches/ros-csrss/win32ss/user/ntuser/menu.c
branches/ros-csrss/win32ss/user/ntuser/ntuser.c
branches/ros-csrss/win32ss/user/ntuser/ntuser.h
branches/ros-csrss/win32ss/user/ntuser/simplecall.c
branches/ros-csrss/win32ss/user/winsrv/init.c
branches/ros-csrss/win32ss/user/winsrv/shutdown.c
branches/ros-csrss/win32ss/user/winsrv/winsrv.h
branches/ros-csrss/win32ss/win32kp.h
Modified: branches/ros-csrss/dll/ntdll/include/ntdllp.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/include/ntd…
==============================================================================
--- branches/ros-csrss/dll/ntdll/include/ntdllp.h [iso-8859-1] (original)
+++ branches/ros-csrss/dll/ntdll/include/ntdllp.h [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -162,7 +162,5 @@
VOID
NTAPI
LdrpFinalizeAndDeallocateDataTableEntry(IN PLDR_DATA_TABLE_ENTRY Entry);
-
-extern HANDLE WindowsApiPort;
/* EOF */
Modified: branches/ros-csrss/dll/win32/kernel32/include/kernel32.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/in…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/include/kernel32.h [iso-8859-1] (original)
+++ branches/ros-csrss/dll/win32/kernel32/include/kernel32.h [iso-8859-1] Fri Nov 2
13:50:31 2012
@@ -155,7 +155,6 @@
#define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_SUCCESS 2
#define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_CONTINUE 3
-
extern PBASE_STATIC_SERVER_DATA BaseStaticServerData;
typedef
@@ -164,8 +163,6 @@
HANDLE hProcess,
DWORD dwMilliseconds);
-
-extern BOOLEAN InWindows;
extern WaitForInputIdleType UserWaitForInputIdleRoutine;
/* GLOBAL VARIABLES **********************************************************/
Modified: branches/ros-csrss/win32ss/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/CMakeLists.tx…
==============================================================================
--- branches/ros-csrss/win32ss/CMakeLists.txt [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/CMakeLists.txt [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -103,7 +103,6 @@
user/ntuser/caret.c
user/ntuser/class.c
user/ntuser/clipboard.c
- user/ntuser/csr.c
user/ntuser/defwnd.c
user/ntuser/desktop.c
user/ntuser/display.c
Modified: branches/ros-csrss/win32ss/gdi/ntgdi/gdikdbgext.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/gdi/ntgdi/gdi…
==============================================================================
--- branches/ros-csrss/win32ss/gdi/ntgdi/gdikdbgext.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/gdi/ntgdi/gdikdbgext.c [iso-8859-1] Fri Nov 2 13:50:31
2012
@@ -14,7 +14,6 @@
extern PENTRY gpentHmgr;
extern PULONG gpaulRefCount;
-extern PEPROCESS gpepCSRSS;
extern ULONG gulFirstUnused;
Removed: 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 (removed)
@@ -1,52 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * PURPOSE: Interface to csrss
- * FILE: subsys/win32k/ntuser/csr.c
- * PROGRAMER: Ge van Geldorp (ge(a)gse.nl)
- */
-
-#include <win32k.h>
-DBG_DEFAULT_CHANNEL(UserMisc);
-
-static HANDLE WindowsApiPort = NULL;
-PEPROCESS CsrProcess = NULL;
-
-NTSTATUS FASTCALL
-CsrInit(void)
-{
- NTSTATUS Status;
- UNICODE_STRING PortName;
- ULONG ConnectInfoLength;
- SECURITY_QUALITY_OF_SERVICE Qos;
-
- ERR("CsrInit\n");
-
- RtlInitUnicodeString(&PortName, L"\\Windows\\ApiPort");
- ConnectInfoLength = 0;
- Qos.Length = sizeof(Qos);
- Qos.ImpersonationLevel = SecurityDelegation;
- Qos.ContextTrackingMode = SECURITY_STATIC_TRACKING;
- Qos.EffectiveOnly = FALSE;
-
- CsrProcess = PsGetCurrentProcess();
- ERR("CsrInit - CsrProcess = 0x%p\n", CsrProcess);
-
- Status = ZwConnectPort(&WindowsApiPort,
- &PortName,
- &Qos,
- NULL,
- NULL,
- NULL,
- NULL,
- &ConnectInfoLength);
- if (!NT_SUCCESS(Status))
- {
- ERR("CsrInit - Status = 0x%p\n", Status);
- return Status;
- }
-
- return STATUS_SUCCESS;
-}
-
-/* EOF */
Removed: 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 (removed)
@@ -1,16 +1,0 @@
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * PURPOSE: Interface to csrss
- * FILE: subsys/win32k/include/csr.h
- * PROGRAMER: Ge van Geldorp (ge(a)gse.nl)
- */
-
-#pragma once
-
-extern PEPROCESS CsrProcess;
-
-NTSTATUS FASTCALL CsrInit(void);
-
-/* EOF */
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] Fri Nov 2 13:50:31
2012
@@ -2024,7 +2024,7 @@
// FIXME: IntSetThreadDesktop validates the desktop handle, it should happen
// here too and set the NT error level. Q. Is it necessary to have the validation
// in IntSetThreadDesktop? Is it needed there too?
- if (hDesktop || (!hDesktop && CsrProcess == PsGetCurrentProcess()))
+ if (hDesktop || (!hDesktop && PsGetCurrentProcess() == gpepCSRSS))
ret = IntSetThreadDesktop(hDesktop, FALSE);
UserLeave();
Modified: branches/ros-csrss/win32ss/user/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/h…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/hook.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/hook.c [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -94,7 +94,7 @@
ERR("IntHookModuleUnloaded: iHookID=%d\n", iHookID);
- ppiCsr = PsGetProcessWin32Process(CsrProcess);
+ ppiCsr = PsGetProcessWin32Process(gpepCSRSS);
ListEntry = pdesk->PtiList.Flink;
while(ListEntry != &pdesk->PtiList)
@@ -147,7 +147,7 @@
PPROCESSINFO ppiCsr;
pti = PsGetCurrentThreadWin32Thread();
- ppiCsr = PsGetProcessWin32Process(CsrProcess);
+ ppiCsr = PsGetProcessWin32Process(gpepCSRSS);
/* Fail if the api hook is already registered */
if(gpsi->dwSRVIFlags & SRVINFO_APIHOOK)
Modified: branches/ros-csrss/win32ss/user/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/m…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/menu.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/menu.c [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -1522,14 +1522,13 @@
NTSTATUS Status;
PEPROCESS CurrentProcess = PsGetCurrentProcess();
- if (CsrProcess != CurrentProcess)
+ if (gpepCSRSS != CurrentProcess)
{
/*
- * CsrProcess does not have a Win32WindowStation
- *
- */
-
- Status =
IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
+ * gpepCSRSS does not have a Win32WindowStation
+ */
+
+ Status = IntValidateWindowStationHandle(CurrentProcess->Win32WindowStation,
KernelMode,
0,
&WinStaObject);
Modified: branches/ros-csrss/win32ss/user/ntuser/ntuser.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/n…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/ntuser.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/ntuser.c [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -20,7 +20,7 @@
BOOL gbInitialized;
HINSTANCE hModClient = NULL;
BOOL ClientPfnInit = FALSE;
-PEPROCESS gpepCSRSS;
+PEPROCESS gpepCSRSS = NULL;
/* PRIVATE FUNCTIONS *********************************************************/
@@ -133,8 +133,6 @@
NtUserUpdatePerUserSystemParameters(0, TRUE);
- CsrInit();
-
if (gpsi->hbrGray == NULL)
{
hPattern55AABitmap = GreCreateBitmap(8, 8, 1, 1, (LPBYTE)wPattern55AA);
Modified: branches/ros-csrss/win32ss/user/ntuser/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/n…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/ntuser.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/ntuser.h [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -15,6 +15,7 @@
extern PPROCESSINFO gppiList;
extern PPROCESSINFO ppiScrnSaver;
extern PPROCESSINFO gppiInputProvider;
+extern PEPROCESS gpepCSRSS;
INIT_FUNCTION NTSTATUS NTAPI InitUserImpl(VOID);
VOID FASTCALL CleanupUserImpl(VOID);
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] Fri Nov 2 13:50:31
2012
@@ -334,7 +334,7 @@
BOOL Ret = TRUE;
PPROCESSINFO ppi;
PDWORD pdwLayout;
- if ( PsGetCurrentProcess() == CsrProcess)
+ if ( PsGetCurrentProcess() == gpepCSRSS)
{
EngSetLastError(ERROR_INVALID_ACCESS);
RETURN(FALSE);
Modified: branches/ros-csrss/win32ss/user/winsrv/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/i…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/init.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/init.c [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -16,7 +16,7 @@
#define NDEBUG
#include <debug.h>
-HANDLE DllHandle = NULL;
+HINSTANCE UserSrvDllInstance = NULL;
// HANDLE WinSrvApiPort = NULL;
/* Memory */
@@ -357,7 +357,7 @@
BOOL
WINAPI
-DllMain(IN HANDLE hDll,
+DllMain(IN HINSTANCE hInstanceDll,
IN DWORD dwReason,
IN LPVOID lpReserved)
{
@@ -366,7 +366,7 @@
if (DLL_PROCESS_ATTACH == dwReason)
{
- DllHandle = hDll;
+ UserSrvDllInstance = hInstanceDll;
/*** HACK from win32csr... ***/
Modified: branches/ros-csrss/win32ss/user/winsrv/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/s…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/shutdown.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/shutdown.c [iso-8859-1] Fri Nov 2 13:50:31
2012
@@ -244,7 +244,7 @@
SetThreadDesktop(NotifyContext->Desktop);
SwitchDesktop(NotifyContext->Desktop);
CallInitCommonControls();
- NotifyContext->Dlg = CreateDialogParam(GetModuleHandleW(L"win32csr"),
+ NotifyContext->Dlg = CreateDialogParam(UserSrvDllInstance,
MAKEINTRESOURCE(IDD_END_NOW), NULL,
EndNowDlgProc, (LPARAM) NotifyContext);
if (NULL == NotifyContext->Dlg)
Modified: branches/ros-csrss/win32ss/user/winsrv/winsrv.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/w…
==============================================================================
--- branches/ros-csrss/win32ss/user/winsrv/winsrv.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/winsrv/winsrv.h [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -36,6 +36,7 @@
#include "resource.h"
+extern HINSTANCE UserSrvDllInstance;
extern HANDLE UserSrvHeap;
// extern HANDLE BaseSrvSharedHeap;
// extern PBASE_STATIC_SERVER_DATA BaseStaticServerData;
Modified: branches/ros-csrss/win32ss/win32kp.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/win32kp.h?rev…
==============================================================================
--- branches/ros-csrss/win32ss/win32kp.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/win32kp.h [iso-8859-1] Fri Nov 2 13:50:31 2012
@@ -100,7 +100,6 @@
#include "user/ntuser/vis.h"
#include "user/ntuser/userfuncs.h"
#include "user/ntuser/scroll.h"
-#include "user/ntuser/csr.h"
#include "user/ntuser/winpos.h"
#include "user/ntuser/callback.h"