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
b722e772
Commit
b722e772
authored
May 01, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
May 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Simplify code a bit by using get_dir_and_size().
parent
1d3dfd9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
24 deletions
+4
-24
pe.c
tools/winedump/pe.c
+4
-24
No files found.
tools/winedump/pe.c
View file @
b722e772
...
...
@@ -756,20 +756,10 @@ static void dump_image_thunk_data32(const IMAGE_THUNK_DATA32 *il, int offset)
static
void
dump_dir_imported_functions
(
void
)
{
const
IMAGE_IMPORT_DESCRIPTOR
*
importDesc
=
get_dir
(
IMAGE_FILE_IMPORT_DIRECTORY
)
;
DWORD
directorySize
;
unsigned
directorySize
;
const
IMAGE_IMPORT_DESCRIPTOR
*
importDesc
=
get_dir_and_size
(
IMAGE_FILE_IMPORT_DIRECTORY
,
&
directorySize
)
;
if
(
!
importDesc
)
return
;
if
(
PE_nt_headers
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR64_MAGIC
)
{
const
IMAGE_OPTIONAL_HEADER64
*
opt
=
(
const
IMAGE_OPTIONAL_HEADER64
*
)
&
PE_nt_headers
->
OptionalHeader
;
directorySize
=
opt
->
DataDirectory
[
IMAGE_FILE_IMPORT_DIRECTORY
].
Size
;
}
else
{
const
IMAGE_OPTIONAL_HEADER32
*
opt
=
(
const
IMAGE_OPTIONAL_HEADER32
*
)
&
PE_nt_headers
->
OptionalHeader
;
directorySize
=
opt
->
DataDirectory
[
IMAGE_FILE_IMPORT_DIRECTORY
].
Size
;
}
printf
(
"Import Table size: %08x
\n
"
,
directorySize
);
/* FIXME */
...
...
@@ -809,6 +799,7 @@ static void dump_dir_imported_functions(void)
static
void
dump_dir_delay_imported_functions
(
void
)
{
unsigned
directorySize
;
const
struct
ImgDelayDescr
{
DWORD
grAttrs
;
...
...
@@ -819,20 +810,9 @@ static void dump_dir_delay_imported_functions(void)
DWORD
pBoundIAT
;
DWORD
pUnloadIAT
;
DWORD
dwTimeStamp
;
}
*
importDesc
=
get_dir
(
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
);
DWORD
directorySize
;
}
*
importDesc
=
get_dir_and_size
(
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
,
&
directorySize
);
if
(
!
importDesc
)
return
;
if
(
PE_nt_headers
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR64_MAGIC
)
{
const
IMAGE_OPTIONAL_HEADER64
*
opt
=
(
const
IMAGE_OPTIONAL_HEADER64
*
)
&
PE_nt_headers
->
OptionalHeader
;
directorySize
=
opt
->
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
].
Size
;
}
else
{
const
IMAGE_OPTIONAL_HEADER32
*
opt
=
(
const
IMAGE_OPTIONAL_HEADER32
*
)
&
PE_nt_headers
->
OptionalHeader
;
directorySize
=
opt
->
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
].
Size
;
}
printf
(
"Delay Import Table size: %08x
\n
"
,
directorySize
);
/* FIXME */
...
...
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