Author: tkreuzer
Date: Wed Dec 22 13:07:04 2010
New Revision: 50092
URL:
http://svn.reactos.org/svn/reactos?rev=50092&view=rev
Log:
[NTDLL]
Move RtlPcToFileHeader to rtl/libsupp.c
Modified:
trunk/reactos/dll/ntdll/ldr/utils.c
trunk/reactos/dll/ntdll/rtl/libsupp.c
Modified: trunk/reactos/dll/ntdll/ldr/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Wed Dec 22 13:07:04 2010
@@ -2665,39 +2665,6 @@
/*
* @implemented
*/
-PVOID NTAPI
-RtlPcToFileHeader(IN PVOID PcValue,
- PVOID* BaseOfImage)
-{
- PLIST_ENTRY ModuleListHead;
- PLIST_ENTRY Entry;
- PLDR_DATA_TABLE_ENTRY Module;
- PVOID ImageBase = NULL;
-
- RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock);
- ModuleListHead = &NtCurrentPeb()->Ldr->InLoadOrderModuleList;
- Entry = ModuleListHead->Flink;
- while (Entry != ModuleListHead)
- {
- Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
-
- if ((ULONG_PTR)PcValue >= (ULONG_PTR)Module->DllBase &&
- (ULONG_PTR)PcValue < (ULONG_PTR)Module->DllBase +
Module->SizeOfImage)
- {
- ImageBase = Module->DllBase;
- break;
- }
- Entry = Entry->Flink;
- }
- RtlLeaveCriticalSection (NtCurrentPeb()->LoaderLock);
-
- *BaseOfImage = ImageBase;
- return ImageBase;
-}
-
-/*
- * @implemented
- */
NTSTATUS NTAPI
LdrGetProcedureAddress (IN PVOID BaseAddress,
IN PANSI_STRING Name,
Modified: trunk/reactos/dll/ntdll/rtl/libsupp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/rtl/libsupp.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/rtl/libsupp.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/rtl/libsupp.c [iso-8859-1] Wed Dec 22 13:07:04 2010
@@ -486,3 +486,36 @@
*ret = resdirptr;
return STATUS_SUCCESS;
}
+
+/*
+ * @implemented
+ */
+PVOID NTAPI
+RtlPcToFileHeader(IN PVOID PcValue,
+ PVOID* BaseOfImage)
+{
+ PLIST_ENTRY ModuleListHead;
+ PLIST_ENTRY Entry;
+ PLDR_DATA_TABLE_ENTRY Module;
+ PVOID ImageBase = NULL;
+
+ RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock);
+ ModuleListHead = &NtCurrentPeb()->Ldr->InLoadOrderModuleList;
+ Entry = ModuleListHead->Flink;
+ while (Entry != ModuleListHead)
+ {
+ Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
+
+ if ((ULONG_PTR)PcValue >= (ULONG_PTR)Module->DllBase &&
+ (ULONG_PTR)PcValue < (ULONG_PTR)Module->DllBase +
Module->SizeOfImage)
+ {
+ ImageBase = Module->DllBase;
+ break;
+ }
+ Entry = Entry->Flink;
+ }
+ RtlLeaveCriticalSection (NtCurrentPeb()->LoaderLock);
+
+ *BaseOfImage = ImageBase;
+ return ImageBase;
+}