mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[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. svn path=/branches/ros-csrss/; revision=57665
This commit is contained in:
parent
dbcead9345
commit
bd4d83d88f
16 changed files with 15 additions and 92 deletions
|
@ -162,7 +162,5 @@ LdrpLoadImportModule(IN PWSTR DllPath OPTIONAL,
|
|||
VOID
|
||||
NTAPI
|
||||
LdrpFinalizeAndDeallocateDataTableEntry(IN PLDR_DATA_TABLE_ENTRY Entry);
|
||||
|
||||
extern HANDLE WindowsApiPort;
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -155,7 +155,6 @@ typedef struct _BASEP_ACTCTX_BLOCK
|
|||
#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 @@ DWORD
|
|||
HANDLE hProcess,
|
||||
DWORD dwMilliseconds);
|
||||
|
||||
|
||||
extern BOOLEAN InWindows;
|
||||
extern WaitForInputIdleType UserWaitForInputIdleRoutine;
|
||||
|
||||
/* GLOBAL VARIABLES **********************************************************/
|
||||
|
|
|
@ -103,7 +103,6 @@ list(APPEND SOURCE
|
|||
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
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
extern PENTRY gpentHmgr;
|
||||
extern PULONG gpaulRefCount;
|
||||
extern PEPROCESS gpepCSRSS;
|
||||
extern ULONG gulFirstUnused;
|
||||
|
||||
|
||||
|
|
|
@ -1,52 +0,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@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 */
|
|
@ -1,16 +0,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@gse.nl)
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
extern PEPROCESS CsrProcess;
|
||||
|
||||
NTSTATUS FASTCALL CsrInit(void);
|
||||
|
||||
/* EOF */
|
|
@ -2024,7 +2024,7 @@ NtUserSetThreadDesktop(HDESK hDesktop)
|
|||
// 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();
|
||||
|
|
|
@ -94,7 +94,7 @@ IntHookModuleUnloaded(PDESKTOP pdesk, int iHookID, HHOOK hHook)
|
|||
|
||||
ERR("IntHookModuleUnloaded: iHookID=%d\n", iHookID);
|
||||
|
||||
ppiCsr = PsGetProcessWin32Process(CsrProcess);
|
||||
ppiCsr = PsGetProcessWin32Process(gpepCSRSS);
|
||||
|
||||
ListEntry = pdesk->PtiList.Flink;
|
||||
while(ListEntry != &pdesk->PtiList)
|
||||
|
@ -147,7 +147,7 @@ UserRegisterUserApiHook(
|
|||
PPROCESSINFO ppiCsr;
|
||||
|
||||
pti = PsGetCurrentThreadWin32Thread();
|
||||
ppiCsr = PsGetProcessWin32Process(CsrProcess);
|
||||
ppiCsr = PsGetProcessWin32Process(gpepCSRSS);
|
||||
|
||||
/* Fail if the api hook is already registered */
|
||||
if(gpsi->dwSRVIFlags & SRVINFO_APIHOOK)
|
||||
|
|
|
@ -1522,14 +1522,13 @@ HMENU FASTCALL UserCreateMenu(BOOL PopupMenu)
|
|||
NTSTATUS Status;
|
||||
PEPROCESS CurrentProcess = PsGetCurrentProcess();
|
||||
|
||||
if (CsrProcess != CurrentProcess)
|
||||
if (gpepCSRSS != CurrentProcess)
|
||||
{
|
||||
/*
|
||||
* CsrProcess does not have a Win32WindowStation
|
||||
*
|
||||
*/
|
||||
* gpepCSRSS does not have a Win32WindowStation
|
||||
*/
|
||||
|
||||
Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
|
||||
Status = IntValidateWindowStationHandle(CurrentProcess->Win32WindowStation,
|
||||
KernelMode,
|
||||
0,
|
||||
&WinStaObject);
|
||||
|
|
|
@ -20,7 +20,7 @@ ATOM AtomFlashWndState; // Window Flash State atom.
|
|||
BOOL gbInitialized;
|
||||
HINSTANCE hModClient = NULL;
|
||||
BOOL ClientPfnInit = FALSE;
|
||||
PEPROCESS gpepCSRSS;
|
||||
PEPROCESS gpepCSRSS = NULL;
|
||||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
|
@ -133,8 +133,6 @@ UserInitialize(
|
|||
|
||||
NtUserUpdatePerUserSystemParameters(0, TRUE);
|
||||
|
||||
CsrInit();
|
||||
|
||||
if (gpsi->hbrGray == NULL)
|
||||
{
|
||||
hPattern55AABitmap = GreCreateBitmap(8, 8, 1, 1, (LPBYTE)wPattern55AA);
|
||||
|
|
|
@ -15,6 +15,7 @@ extern PTHREADINFO gptiCurrent;
|
|||
extern PPROCESSINFO gppiList;
|
||||
extern PPROCESSINFO ppiScrnSaver;
|
||||
extern PPROCESSINFO gppiInputProvider;
|
||||
extern PEPROCESS gpepCSRSS;
|
||||
|
||||
INIT_FUNCTION NTSTATUS NTAPI InitUserImpl(VOID);
|
||||
VOID FASTCALL CleanupUserImpl(VOID);
|
||||
|
|
|
@ -334,7 +334,7 @@ NtUserCallOneParam(
|
|||
BOOL Ret = TRUE;
|
||||
PPROCESSINFO ppi;
|
||||
PDWORD pdwLayout;
|
||||
if ( PsGetCurrentProcess() == CsrProcess)
|
||||
if ( PsGetCurrentProcess() == gpepCSRSS)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_ACCESS);
|
||||
RETURN(FALSE);
|
||||
|
|
|
@ -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 _UserSoundSentry(VOID)
|
|||
|
||||
BOOL
|
||||
WINAPI
|
||||
DllMain(IN HANDLE hDll,
|
||||
DllMain(IN HINSTANCE hInstanceDll,
|
||||
IN DWORD dwReason,
|
||||
IN LPVOID lpReserved)
|
||||
{
|
||||
|
@ -366,7 +366,7 @@ DllMain(IN HANDLE hDll,
|
|||
|
||||
if (DLL_PROCESS_ATTACH == dwReason)
|
||||
{
|
||||
DllHandle = hDll;
|
||||
UserSrvDllInstance = hInstanceDll;
|
||||
|
||||
/*** HACK from win32csr... ***/
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ EndNowThreadProc(LPVOID Parameter)
|
|||
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)
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "resource.h"
|
||||
|
||||
|
||||
extern HINSTANCE UserSrvDllInstance;
|
||||
extern HANDLE UserSrvHeap;
|
||||
// extern HANDLE BaseSrvSharedHeap;
|
||||
// extern PBASE_STATIC_SERVER_DATA BaseStaticServerData;
|
||||
|
|
|
@ -100,7 +100,6 @@ typedef struct _DESKTOP *PDESKTOP;
|
|||
#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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue