Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8b7beee0
Commit
8b7beee0
authored
Feb 11, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imagehlp: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d0819c7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
Makefile.in
dlls/imagehlp/Makefile.in
+1
-1
access.c
dlls/imagehlp/access.c
+3
-3
integrity.c
dlls/imagehlp/integrity.c
+9
-9
modify.c
dlls/imagehlp/modify.c
+9
-9
No files found.
dlls/imagehlp/Makefile.in
View file @
8b7beee0
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_IMAGEHLP_SOURCE_
EXTRADEFS
=
-D_IMAGEHLP_SOURCE_
MODULE
=
imagehlp.dll
IMPORTLIB
=
imagehlp
IMPORTS
=
dbghelp
...
...
dlls/imagehlp/access.c
View file @
8b7beee0
...
...
@@ -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 = %
l
d
\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 = %
l
d
\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 = %
l
d
\n
"
,
GetLastError
());
goto
Error
;
}
...
...
dlls/imagehlp/integrity.c
View file @
8b7beee0
...
...
@@ -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 = %l
x
\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 = %l
x
\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 = %l
x
\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 %
l
d
\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 = %08
l
x 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 %
l
d %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 %
l
d %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, %
l
d, %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, %
l
d)
\n
"
,
FileHandle
,
Index
);
r
=
ImageEnumerateCertificates
(
FileHandle
,
CERT_SECTION_TYPE_ANY
,
&
count
,
NULL
,
0
);
...
...
dlls/imagehlp/modify.c
View file @
8b7beee0
...
...
@@ -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 %#
l
x, 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 %#
l
x.
\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 %#
l
x.
\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 %#
l
x.
\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 %#
I
x.
\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, %
l
d, %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, %l
d): 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, %
l
d): 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, %
l
d): stub
\n
"
,
debugstr_a
(
ImageFileName
),
debugstr_a
(
SymbolPath
),
debugstr_a
(
DebugFilePath
),
NtHeaders
,
OldChecksum
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment