Commit 76fc4175 authored by Marcus R. Brown's avatar Marcus R. Brown Committed by Alexandre Julliard

Replace various routines with a forward to ntdll.

parent 7f7cde0e
......@@ -4,7 +4,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = imagehlp.dll
IMPORTS = kernel32
IMPORTS = kernel32 ntdll
C_SRCS = \
access.c \
......
......@@ -23,6 +23,8 @@
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "winreg.h"
#include "winternl.h"
#include "winerror.h"
#include "wine/debug.h"
#include "imagehlp.h"
......@@ -107,19 +109,6 @@ DWORD WINAPI GetImageUnusedHeaderBytes(
}
/***********************************************************************
* ImageDirectoryEntryToData (IMAGEHLP.@)
*/
PVOID WINAPI ImageDirectoryEntryToData(
PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size)
{
FIXME("(%p, %d, %hd, %p): stub\n",
Base, MappedAsImage, DirectoryEntry, Size
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
}
/***********************************************************************
* ImageLoad (IMAGEHLP.@)
*/
PLOADED_IMAGE WINAPI ImageLoad(LPSTR DllName, LPSTR DllPath)
......@@ -136,41 +125,6 @@ PLOADED_IMAGE WINAPI ImageLoad(LPSTR DllName, LPSTR DllPath)
}
/***********************************************************************
* ImageNtHeader (IMAGEHLP.@)
*/
PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID Base)
{
TRACE("(%p)\n", Base);
return (PIMAGE_NT_HEADERS)
((LPBYTE) Base + ((PIMAGE_DOS_HEADER) Base)->e_lfanew);
}
/***********************************************************************
* ImageRvaToSection (IMAGEHLP.@)
*/
PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(
PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva)
{
FIXME("(%p, %p, %ld): stub\n", NtHeaders, Base, Rva);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
}
/***********************************************************************
* ImageRvaToVa (IMAGEHLP.@)
*/
PVOID WINAPI ImageRvaToVa(
PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva,
PIMAGE_SECTION_HEADER *LastRvaSection)
{
FIXME("(%p, %p, %ld, %p): stub\n",
NtHeaders, Base, Rva, LastRvaSection
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
}
/***********************************************************************
* ImageUnload (IMAGEHLP.@)
*/
BOOL WINAPI ImageUnload(PLOADED_IMAGE pLoadedImage)
......@@ -268,7 +222,7 @@ BOOL WINAPI MapAndLoad(
IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE)
);
pNtHeader = ImageNtHeader((PVOID) hModule);
pNtHeader = RtlImageNtHeader(hModule);
pLoadedImage->ModuleName = HeapAlloc(IMAGEHLP_hHeap, 0, strlen(pszDllPath)+1); /* FIXME: Correct? */
strcpy( pLoadedImage->ModuleName, pszDllPath );
......
......@@ -8,16 +8,16 @@
@ stdcall GetImageUnusedHeaderBytes(ptr ptr)
@ stdcall GetTimestampForLoadedLibrary(long)
@ stdcall ImageAddCertificate(long ptr ptr)
@ stdcall ImageDirectoryEntryToData(ptr long long ptr)
@ stdcall ImageDirectoryEntryToData(ptr long long ptr) ntdll.RtlImageDirectoryEntryToData
@ stdcall ImageEnumerateCertificates(long long ptr ptr long)
@ stdcall ImageGetCertificateData(long long ptr ptr)
@ stdcall ImageGetCertificateHeader(long long ptr)
@ stdcall ImageGetDigestStream(long long ptr long)
@ stdcall ImageLoad(str str)
@ stdcall ImageNtHeader(ptr)
@ stdcall ImageNtHeader(ptr) ntdll.RtlImageNtHeader
@ stdcall ImageRemoveCertificate(long long)
@ stdcall ImageRvaToSection(ptr ptr long)
@ stdcall ImageRvaToVa(ptr ptr long ptr)
@ stdcall ImageRvaToSection(ptr ptr long) ntdll.RtlImageRvaToSection
@ stdcall ImageRvaToVa(ptr ptr long ptr) ntdll.RtlImageRvaToVa
@ stdcall ImageUnload(ptr)
@ stdcall ImagehlpApiVersion()
@ stdcall ImagehlpApiVersionEx(ptr)
......
......@@ -22,6 +22,8 @@
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winternl.h"
#include "winerror.h"
#include "wine/debug.h"
#include "imagehlp.h"
......@@ -101,7 +103,7 @@ PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
BaseAddress,
(FileLength + 1) / sizeof(WORD));
Header = ImageNtHeader(BaseAddress);
Header = RtlImageNtHeader(BaseAddress);
HdrSum = Header->OptionalHeader.CheckSum;
/* Subtract image checksum from calculated checksum. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment