Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

kulookup.c

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1990 Microsoft Corporation 00004 00005 Module Name: 00006 00007 kulookup.c 00008 00009 Abstract: 00010 00011 The module implements the code necessary to lookup user mode entry points 00012 in the system DLL for exception dispatching and APC delivery. 00013 00014 Author: 00015 00016 David N. Cutler (davec) 8-Oct-90 00017 00018 Revision History: 00019 00020 --*/ 00021 00022 #include "psp.h" 00023 #pragma alloc_text(INIT, PspLookupKernelUserEntryPoints) 00024 00025 NTSTATUS 00026 PspLookupKernelUserEntryPoints ( 00027 VOID 00028 ) 00029 00030 /*++ 00031 00032 Routine Description: 00033 00034 The function locates the address of the exception dispatch and user APC 00035 delivery routine in the system DLL and stores the respective addresses 00036 in the PCR. 00037 00038 Arguments: 00039 00040 None. 00041 00042 Return Value: 00043 00044 NTSTATUS 00045 00046 --*/ 00047 00048 { 00049 00050 NTSTATUS Status; 00051 PSZ EntryName; 00052 00053 // 00054 // Lookup the user mode "trampoline" code for exception dispatching 00055 // 00056 00057 EntryName = "KiUserExceptionDispatcher"; 00058 Status = PspLookupSystemDllEntryPoint(EntryName, 00059 (PVOID *)&KeUserExceptionDispatcher); 00060 if (NT_SUCCESS(Status) == FALSE) { 00061 KdPrint(("Ps: Cannot find user exception dispatcher address\n")); 00062 return Status; 00063 } 00064 00065 // 00066 // Lookup the user mode "trampoline" code for APC dispatching 00067 // 00068 00069 EntryName = "KiUserApcDispatcher"; 00070 Status = PspLookupSystemDllEntryPoint(EntryName, 00071 (PVOID *)&KeUserApcDispatcher); 00072 if (NT_SUCCESS(Status) == FALSE) { 00073 KdPrint(("Ps: Cannot find user apc dispatcher address\n")); 00074 return Status; 00075 } 00076 00077 // 00078 // Lookup the user mode "trampoline" code for callback dispatching. 00079 // 00080 00081 EntryName = "KiUserCallbackDispatcher"; 00082 Status = PspLookupSystemDllEntryPoint(EntryName, 00083 (PVOID *)&KeUserCallbackDispatcher); 00084 if (NT_SUCCESS(Status) == FALSE) { 00085 KdPrint(("Ps: Cannot find user callback dispatcher address\n")); 00086 return Status; 00087 } 00088 00089 // 00090 // Lookup the user mode "trampoline" code for raising a usermode exception 00091 // 00092 00093 EntryName = "KiRaiseUserExceptionDispatcher"; 00094 Status = PspLookupSystemDllEntryPoint(EntryName, 00095 (PVOID *)&KeRaiseUserExceptionDispatcher); 00096 if (NT_SUCCESS(Status) == FALSE) { 00097 KdPrint(("Ps: Cannot find raise user exception dispatcher address\n")); 00098 return Status; 00099 } 00100 00101 return Status; 00102 }

Generated on Sat May 15 19:40:35 2004 for test by doxygen 1.3.7