imagehlp: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d0819c7e5b
commit
8b7beee065
|
@ -1,4 +1,4 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES -D_IMAGEHLP_SOURCE_
|
||||
EXTRADEFS = -D_IMAGEHLP_SOURCE_
|
||||
MODULE = imagehlp.dll
|
||||
IMPORTLIB = imagehlp
|
||||
IMPORTS = dbghelp
|
||||
|
|
|
@ -153,7 +153,7 @@ BOOL WINAPI MapAndLoad(PCSTR pszImageName, PCSTR pszDllPath, PLOADED_IMAGE pLoad
|
|||
NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
WARN("CreateFile: Error = %d\n", GetLastError());
|
||||
WARN("CreateFile: Error = %ld\n", GetLastError());
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ BOOL WINAPI MapAndLoad(PCSTR pszImageName, PCSTR pszDllPath, PLOADED_IMAGE pLoad
|
|||
0, 0, NULL);
|
||||
if (!hFileMapping)
|
||||
{
|
||||
WARN("CreateFileMapping: Error = %d\n", GetLastError());
|
||||
WARN("CreateFileMapping: Error = %ld\n", GetLastError());
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ BOOL WINAPI MapAndLoad(PCSTR pszImageName, PCSTR pszDllPath, PLOADED_IMAGE pLoad
|
|||
CloseHandle(hFileMapping);
|
||||
if (!mapping)
|
||||
{
|
||||
WARN("MapViewOfFile: Error = %d\n", GetLastError());
|
||||
WARN("MapViewOfFile: Error = %ld\n", GetLastError());
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ static BOOL IMAGEHLP_GetSecurityDirOffset( HANDLE handle,
|
|||
else
|
||||
return FALSE;
|
||||
|
||||
TRACE("ret = %d size = %x addr = %x\n", ret, sd->Size, sd->VirtualAddress);
|
||||
TRACE("ret = %d size = %lx addr = %lx\n", ret, sd->Size, sd->VirtualAddress);
|
||||
|
||||
*pdwSize = sd->Size;
|
||||
*pdwOfs = sd->VirtualAddress;
|
||||
|
@ -208,7 +208,7 @@ static BOOL IMAGEHLP_SetSecurityDirOffset(HANDLE handle,
|
|||
sd->Size = dwSize;
|
||||
sd->VirtualAddress = dwOfs;
|
||||
|
||||
TRACE("size = %x addr = %x\n", sd->Size, sd->VirtualAddress);
|
||||
TRACE("size = %lx addr = %lx\n", sd->Size, sd->VirtualAddress);
|
||||
|
||||
/* write the header back again */
|
||||
count = SetFilePointer(handle, pe_offset, NULL, FILE_BEGIN);
|
||||
|
@ -282,7 +282,7 @@ static BOOL IMAGEHLP_GetCertificateOffset( HANDLE handle, DWORD num,
|
|||
*pdwOfs = sd_VirtualAddr + offset;
|
||||
*pdwSize = len;
|
||||
|
||||
TRACE("len = %x addr = %x\n", len, sd_VirtualAddr + offset);
|
||||
TRACE("len = %lx addr = %lx\n", len, sd_VirtualAddr + offset);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ BOOL WINAPI ImageEnumerateCertificates(
|
|||
const size_t cert_hdr_size = sizeof hdr - sizeof hdr.bCertificate;
|
||||
BOOL r;
|
||||
|
||||
TRACE("%p %hd %p %p %d\n",
|
||||
TRACE("%p %hd %p %p %ld\n",
|
||||
handle, TypeFilter, CertificateCount, Indices, IndexCount);
|
||||
|
||||
r = IMAGEHLP_GetSecurityDirOffset( handle, &sd_VirtualAddr, &size );
|
||||
|
@ -515,7 +515,7 @@ BOOL WINAPI ImageEnumerateCertificates(
|
|||
if( count != cert_hdr_size )
|
||||
return FALSE;
|
||||
|
||||
TRACE("Size = %08x id = %08hx\n",
|
||||
TRACE("Size = %08lx id = %08hx\n",
|
||||
hdr.dwLength, hdr.wCertificateType );
|
||||
|
||||
/* check the certificate is not too big or too small */
|
||||
|
@ -556,7 +556,7 @@ BOOL WINAPI ImageGetCertificateData(
|
|||
{
|
||||
DWORD r, offset, ofs, size, count;
|
||||
|
||||
TRACE("%p %d %p %p\n", handle, Index, Certificate, RequiredLength);
|
||||
TRACE("%p %ld %p %p\n", handle, Index, Certificate, RequiredLength);
|
||||
|
||||
if( !RequiredLength)
|
||||
{
|
||||
|
@ -607,7 +607,7 @@ BOOL WINAPI ImageGetCertificateHeader(
|
|||
DWORD r, offset, ofs, size, count;
|
||||
const size_t cert_hdr_size = sizeof *pCert - sizeof pCert->bCertificate;
|
||||
|
||||
TRACE("%p %d %p\n", handle, index, pCert);
|
||||
TRACE("%p %ld %p\n", handle, index, pCert);
|
||||
|
||||
if( !IMAGEHLP_GetCertificateOffset( handle, index, &ofs, &size ) )
|
||||
return FALSE;
|
||||
|
@ -792,7 +792,7 @@ BOOL WINAPI ImageGetDigestStream(
|
|||
IMAGE_NT_HEADERS *nt_hdr;
|
||||
IMAGE_SECTION_HEADER *section_headers;
|
||||
|
||||
TRACE("(%p, %d, %p, %p)\n", FileHandle, DigestLevel, DigestFunction,
|
||||
TRACE("(%p, %ld, %p, %p)\n", FileHandle, DigestLevel, DigestFunction,
|
||||
DigestHandle);
|
||||
|
||||
/* Get the file size */
|
||||
|
@ -891,7 +891,7 @@ BOOL WINAPI ImageRemoveCertificate(HANDLE FileHandle, DWORD Index)
|
|||
LPVOID cert_data;
|
||||
BOOL r;
|
||||
|
||||
TRACE("(%p, %d)\n", FileHandle, Index);
|
||||
TRACE("(%p, %ld)\n", FileHandle, Index);
|
||||
|
||||
r = ImageEnumerateCertificates(FileHandle, CERT_SECTION_TYPE_ANY, &count, NULL, 0);
|
||||
|
||||
|
|
|
@ -51,13 +51,13 @@ BOOL WINAPI BindImageEx(DWORD flags, const char *module, const char *dll_path,
|
|||
LOADED_IMAGE image;
|
||||
ULONG size;
|
||||
|
||||
TRACE("flags %#x, module %s, dll_path %s, symbol_path %s, cb %p.\n",
|
||||
TRACE("flags %#lx, module %s, dll_path %s, symbol_path %s, cb %p.\n",
|
||||
flags, debugstr_a(module), debugstr_a(dll_path), debugstr_a(symbol_path), cb);
|
||||
|
||||
if (!(flags & BIND_NO_UPDATE))
|
||||
FIXME("Image modification is not implemented.\n");
|
||||
if (flags & ~BIND_NO_UPDATE)
|
||||
FIXME("Ignoring flags %#x.\n", flags);
|
||||
FIXME("Ignoring flags %#lx.\n", flags);
|
||||
|
||||
if (!MapAndLoad(module, dll_path, &image, TRUE, TRUE))
|
||||
return FALSE;
|
||||
|
@ -84,7 +84,7 @@ BOOL WINAPI BindImageEx(DWORD flags, const char *module, const char *dll_path,
|
|||
|
||||
if (!(dll_name = ImageRvaToVa(image.FileHeader, image.MappedAddress, import->Name, 0)))
|
||||
{
|
||||
ERR("Failed to get VA for import name RVA %#x.\n", import->Name);
|
||||
ERR("Failed to get VA for import name RVA %#lx.\n", import->Name);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ BOOL WINAPI BindImageEx(DWORD flags, const char *module, const char *dll_path,
|
|||
thunk_rva = import->OriginalFirstThunk ? import->OriginalFirstThunk : import->FirstThunk;
|
||||
if (!(thunk = ImageRvaToVa(image.FileHeader, image.MappedAddress, thunk_rva, 0)))
|
||||
{
|
||||
ERR("Failed to get VA for import thunk RVA %#x.\n", thunk_rva);
|
||||
ERR("Failed to get VA for import thunk RVA %#lx.\n", thunk_rva);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ BOOL WINAPI BindImageEx(DWORD flags, const char *module, const char *dll_path,
|
|||
|
||||
if (!(name = ImageRvaToVa(image.FileHeader, image.MappedAddress, thunk->u1.AddressOfData, 0)))
|
||||
{
|
||||
ERR("Failed to get VA for name RVA %#x.\n", thunk->u1.AddressOfData);
|
||||
ERR("Failed to get VA for name RVA %#Ix.\n", thunk->u1.AddressOfData);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
|
|||
DWORD CalcSum;
|
||||
DWORD HdrSum;
|
||||
|
||||
TRACE("(%p, %d, %p, %p)\n", BaseAddress, FileLength, HeaderSum, CheckSum);
|
||||
TRACE("(%p, %ld, %p, %p)\n", BaseAddress, FileLength, HeaderSum, CheckSum);
|
||||
|
||||
CalcSum = CalcCheckSum(0, BaseAddress, (FileLength + 1) / sizeof(WORD));
|
||||
header = RtlImageNtHeader(BaseAddress);
|
||||
|
@ -349,7 +349,7 @@ BOOL WINAPI ReBaseImage(
|
|||
ULONG_PTR *NewImageBase, ULONG TimeStamp)
|
||||
{
|
||||
FIXME(
|
||||
"(%s, %s, %d, %d, %d, %d, %p, %p, %p, %p, %d): stub\n",
|
||||
"(%s, %s, %d, %d, %d, %ld, %p, %p, %p, %p, %ld): stub\n",
|
||||
debugstr_a(CurrentImageName),debugstr_a(SymbolPath), fReBase,
|
||||
fRebaseSysfileOk, fGoingDown, CheckImageSize, OldImageSize,
|
||||
OldImageBase, NewImageSize, NewImageBase, TimeStamp
|
||||
|
@ -387,7 +387,7 @@ BOOL WINAPI SplitSymbols(
|
|||
PSTR ImageName, PCSTR SymbolsPath,
|
||||
PSTR SymbolFilePath, ULONG Flags)
|
||||
{
|
||||
FIXME("(%s, %s, %s, %d): stub\n",
|
||||
FIXME("(%s, %s, %s, %ld): stub\n",
|
||||
debugstr_a(ImageName), debugstr_a(SymbolsPath),
|
||||
debugstr_a(SymbolFilePath), Flags
|
||||
);
|
||||
|
@ -417,7 +417,7 @@ BOOL WINAPI UpdateDebugInfoFileEx(
|
|||
PCSTR ImageFileName, PCSTR SymbolPath, PSTR DebugFilePath,
|
||||
PIMAGE_NT_HEADERS32 NtHeaders, DWORD OldChecksum)
|
||||
{
|
||||
FIXME("(%s, %s, %s, %p, %d): stub\n",
|
||||
FIXME("(%s, %s, %s, %p, %ld): stub\n",
|
||||
debugstr_a(ImageFileName), debugstr_a(SymbolPath),
|
||||
debugstr_a(DebugFilePath), NtHeaders, OldChecksum
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue