Replace various routines with a forward to ntdll.

This commit is contained in:
Marcus R. Brown 2003-11-21 21:31:35 +00:00 committed by Alexandre Julliard
parent 7f7cde0eee
commit 76fc417588
4 changed files with 11 additions and 55 deletions

View file

@ -4,7 +4,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = imagehlp.dll MODULE = imagehlp.dll
IMPORTS = kernel32 IMPORTS = kernel32 ntdll
C_SRCS = \ C_SRCS = \
access.c \ access.c \

View file

@ -23,6 +23,8 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winnt.h" #include "winnt.h"
#include "winreg.h"
#include "winternl.h"
#include "winerror.h" #include "winerror.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "imagehlp.h" #include "imagehlp.h"
@ -106,19 +108,6 @@ DWORD WINAPI GetImageUnusedHeaderBytes(
return 0; return 0;
} }
/***********************************************************************
* 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.@) * ImageLoad (IMAGEHLP.@)
*/ */
@ -135,41 +124,6 @@ PLOADED_IMAGE WINAPI ImageLoad(LPSTR DllName, LPSTR DllPath)
return pLoadedImage; return pLoadedImage;
} }
/***********************************************************************
* 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.@) * ImageUnload (IMAGEHLP.@)
*/ */
@ -268,7 +222,7 @@ BOOL WINAPI MapAndLoad(
IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE) IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE)
); );
pNtHeader = ImageNtHeader((PVOID) hModule); pNtHeader = RtlImageNtHeader(hModule);
pLoadedImage->ModuleName = HeapAlloc(IMAGEHLP_hHeap, 0, strlen(pszDllPath)+1); /* FIXME: Correct? */ pLoadedImage->ModuleName = HeapAlloc(IMAGEHLP_hHeap, 0, strlen(pszDllPath)+1); /* FIXME: Correct? */
strcpy( pLoadedImage->ModuleName, pszDllPath ); strcpy( pLoadedImage->ModuleName, pszDllPath );

View file

@ -8,16 +8,16 @@
@ stdcall GetImageUnusedHeaderBytes(ptr ptr) @ stdcall GetImageUnusedHeaderBytes(ptr ptr)
@ stdcall GetTimestampForLoadedLibrary(long) @ stdcall GetTimestampForLoadedLibrary(long)
@ stdcall ImageAddCertificate(long ptr ptr) @ 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 ImageEnumerateCertificates(long long ptr ptr long)
@ stdcall ImageGetCertificateData(long long ptr ptr) @ stdcall ImageGetCertificateData(long long ptr ptr)
@ stdcall ImageGetCertificateHeader(long long ptr) @ stdcall ImageGetCertificateHeader(long long ptr)
@ stdcall ImageGetDigestStream(long long ptr long) @ stdcall ImageGetDigestStream(long long ptr long)
@ stdcall ImageLoad(str str) @ stdcall ImageLoad(str str)
@ stdcall ImageNtHeader(ptr) @ stdcall ImageNtHeader(ptr) ntdll.RtlImageNtHeader
@ stdcall ImageRemoveCertificate(long long) @ stdcall ImageRemoveCertificate(long long)
@ stdcall ImageRvaToSection(ptr ptr long) @ stdcall ImageRvaToSection(ptr ptr long) ntdll.RtlImageRvaToSection
@ stdcall ImageRvaToVa(ptr ptr long ptr) @ stdcall ImageRvaToVa(ptr ptr long ptr) ntdll.RtlImageRvaToVa
@ stdcall ImageUnload(ptr) @ stdcall ImageUnload(ptr)
@ stdcall ImagehlpApiVersion() @ stdcall ImagehlpApiVersion()
@ stdcall ImagehlpApiVersionEx(ptr) @ stdcall ImagehlpApiVersionEx(ptr)

View file

@ -22,6 +22,8 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winreg.h"
#include "winternl.h"
#include "winerror.h" #include "winerror.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "imagehlp.h" #include "imagehlp.h"
@ -101,7 +103,7 @@ PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
BaseAddress, BaseAddress,
(FileLength + 1) / sizeof(WORD)); (FileLength + 1) / sizeof(WORD));
Header = ImageNtHeader(BaseAddress); Header = RtlImageNtHeader(BaseAddress);
HdrSum = Header->OptionalHeader.CheckSum; HdrSum = Header->OptionalHeader.CheckSum;
/* Subtract image checksum from calculated checksum. */ /* Subtract image checksum from calculated checksum. */