* Rex Jolliff (rex@lvcablemodem.com)
* UPDATE HISTORY:
* DW 26/01/00 Created
+ * Skywing 09/11/2003 Added support for KiRaiseUserExceptionDispatcher
*/
/* INCLUDES *****************************************************************/
static PVOID SystemDllApcDispatcher = NULL;
static PVOID SystemDllCallbackDispatcher = NULL;
static PVOID SystemDllExceptionDispatcher = NULL;
+static PVOID SystemDllRaiseExceptionDispatcher = NULL;
/* FUNCTIONS *****************************************************************/
return(SystemDllApcDispatcher);
}
+PVOID LdrpGetSystemDllRaiseExceptionDispatcher(VOID)
+{
+ return(SystemDllRaiseExceptionDispatcher);
+}
+
NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
PVOID* LdrStartupAddr)
/*
return (Status);
}
}
+
+ /*
+ * Retrieve the offset of the raise exception dispatcher from NTDLL
+ */
+ if (SystemDllRaiseExceptionDispatcher == NULL)
+ {
+ RtlInitAnsiString (&ProcedureName,
+ "KiRaiseUserExceptionDispatcher");
+ Status = LdrGetProcedureAddress ((PVOID)ImageBase,
+ &ProcedureName,
+ 0,
+ &SystemDllRaiseExceptionDispatcher);
+ if (!NT_SUCCESS(Status))
+ {
+ DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status);
+ KeDetachProcess();
+ ObDereferenceObject(Process);
+ ZwClose(NTDllSectionHandle);
+ return (Status);
+ }
+ }
KeDetachProcess();
ObDereferenceObject(Process);