From 9bb38bc012c599d02ba7a24d36e308b796bf1ddf Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sun, 12 Nov 2006 22:36:21 +0000 Subject: [PATCH] - Apologies, forgot these two files for the Dbgk patch. - Adds PsNtDllPathName constant string since we use it in two place (PsLocateSystemDll and DbgkpCreateThread). - Adds PsImageNotifyEnabled boolean flag and sets it to true (although it should only be when a routine is installed, but ROS doesn't do this yet. svn path=/trunk/; revision=24733 --- reactos/ntoskrnl/ps/notify.c | 3 ++- reactos/ntoskrnl/ps/psmgr.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/ps/notify.c b/reactos/ntoskrnl/ps/notify.c index ce82a3cc9ec..f330a81f75d 100644 --- a/reactos/ntoskrnl/ps/notify.c +++ b/reactos/ntoskrnl/ps/notify.c @@ -11,10 +11,11 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ +BOOLEAN PsImageNotifyEnabled = TRUE; ULONG PspThreadNotifyRoutineCount; PCREATE_THREAD_NOTIFY_ROUTINE PspThreadNotifyRoutine[PSP_MAX_CREATE_THREAD_NOTIFY]; diff --git a/reactos/ntoskrnl/ps/psmgr.c b/reactos/ntoskrnl/ps/psmgr.c index a05c8059895..f73ee7f6111 100644 --- a/reactos/ntoskrnl/ps/psmgr.c +++ b/reactos/ntoskrnl/ps/psmgr.c @@ -47,6 +47,9 @@ ANSI_STRING FastName = RTL_CONSTANT_STRING("KiFastSystemCall"); ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KiFastSystemCallRet"); ANSI_STRING InterruptName = RTL_CONSTANT_STRING("KiIntSystemCall"); +UNICODE_STRING PsNtDllPathName = + RTL_CONSTANT_STRING(L"\\SystemRoot\\system32\\ntdll.dll"); + PHANDLE_TABLE PspCidTable; PEPROCESS PsInitialSystemProcess = NULL; @@ -159,7 +162,6 @@ NTSTATUS NTAPI PsLocateSystemDll(VOID) { - UNICODE_STRING DllName = RTL_CONSTANT_STRING(L"\\SystemRoot\\system32\\ntdll.dll"); OBJECT_ATTRIBUTES ObjectAttributes; IO_STATUS_BLOCK IoStatusBlock; HANDLE FileHandle, SectionHandle; @@ -168,7 +170,11 @@ PsLocateSystemDll(VOID) ULONG HardErrorResponse; /* Locate and open NTDLL to determine ImageBase and LdrStartup */ - InitializeObjectAttributes(&ObjectAttributes, &DllName, 0, NULL, NULL); + InitializeObjectAttributes(&ObjectAttributes, + &PsNtDllPathName, + 0, + NULL, + NULL); Status = ZwOpenFile(&FileHandle, FILE_READ_ACCESS, &ObjectAttributes, @@ -186,7 +192,7 @@ PsLocateSystemDll(VOID) if (Status == STATUS_IMAGE_CHECKSUM_MISMATCH) { /* Raise a hard error */ - HardErrorParameters = (ULONG_PTR)&DllName; + HardErrorParameters = (ULONG_PTR)&PsNtDllPathName; NtRaiseHardError(Status, 1, 1,