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
115fbf63
Commit
115fbf63
authored
Jan 30, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Let GetModuleInformation succeed on 64bit modules in wow64.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
c66e8760
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
21 deletions
+9
-21
debug.c
dlls/kernelbase/debug.c
+9
-6
psapi_main.c
dlls/psapi/tests/psapi_main.c
+0
-15
No files found.
dlls/kernelbase/debug.c
View file @
115fbf63
...
...
@@ -1458,7 +1458,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetModuleFileNameExW( HANDLE process, HMODULE mod
*/
BOOL
WINAPI
GetModuleInformation
(
HANDLE
process
,
HMODULE
module
,
MODULEINFO
*
modinfo
,
DWORD
count
)
{
BOOL
wow64
;
BOOL
wow64
,
found
=
FALSE
;
if
(
count
<
sizeof
(
MODULEINFO
))
{
...
...
@@ -1472,12 +1472,15 @@ BOOL WINAPI GetModuleInformation( HANDLE process, HMODULE module, MODULEINFO *mo
{
LDR_DATA_TABLE_ENTRY32
ldr_module32
;
if
(
!
get_ldr_module32
(
process
,
module
,
&
ldr_module32
))
return
FALSE
;
modinfo
->
lpBaseOfDll
=
(
void
*
)(
DWORD_PTR
)
ldr_module32
.
BaseAddress
;
modinfo
->
SizeOfImage
=
ldr_module32
.
SizeOfImage
;
modinfo
->
EntryPoint
=
(
void
*
)(
DWORD_PTR
)
ldr_module32
.
EntryPoint
;
if
(
get_ldr_module32
(
process
,
module
,
&
ldr_module32
))
{
modinfo
->
lpBaseOfDll
=
(
void
*
)(
DWORD_PTR
)
ldr_module32
.
BaseAddress
;
modinfo
->
SizeOfImage
=
ldr_module32
.
SizeOfImage
;
modinfo
->
EntryPoint
=
(
void
*
)(
DWORD_PTR
)
ldr_module32
.
EntryPoint
;
found
=
TRUE
;
}
}
else
if
(
!
found
)
{
LDR_DATA_TABLE_ENTRY
ldr_module
;
...
...
dlls/psapi/tests/psapi_main.c
View file @
115fbf63
...
...
@@ -215,10 +215,6 @@ static BOOL test_EnumProcessModulesEx_snapshot(HANDLE proc, struct moduleex_snap
MODULEINFO
info
;
int
i
,
j
;
BOOL
ret
;
BOOL
fail
,
wow64
;
ret
=
IsWow64Process
(
proc
,
&
wow64
);
ok
(
ret
,
"IsWow64Process failed: %lu
\n
"
,
GetLastError
());
for
(
i
=
0
;
i
<
numsnap
;
i
++
)
{
...
...
@@ -231,27 +227,16 @@ static BOOL test_EnumProcessModulesEx_snapshot(HANDLE proc, struct moduleex_snap
mxsnap
[
i
].
num_modules
=
min
(
needed
,
sizeof
(
mxsnap
[
i
].
modules
))
/
sizeof
(
HMODULE
);
for
(
j
=
0
;
j
<
mxsnap
[
i
].
num_modules
;
j
++
)
{
/* temporary todo until GetModuleBaseName and friends are fixed */
if
((
fail
=
sizeof
(
void
*
)
==
8
&&
wow64
))
switch
(
mxsnap
[
i
].
list
)
{
case
LIST_MODULES_32BIT
:
fail
=
FALSE
;
break
;
case
LIST_MODULES_DEFAULT
:
fail
=
j
>=
1
;
break
;
case
LIST_MODULES_ALL
:
fail
=
j
>=
mxsnap
[
0
].
num_modules
;
break
;
case
LIST_MODULES_64BIT
:
break
;
}
ret
=
GetModuleBaseNameA
(
proc
,
mxsnap
[
i
].
modules
[
j
],
buffer
,
sizeof
(
buffer
));
ok
(
ret
,
"GetModuleBaseName failed: %lu (%u/%lu=%p)
\n
"
,
GetLastError
(),
j
,
mxsnap
[
i
].
num_modules
,
mxsnap
[
i
].
modules
[
j
]);
ret
=
GetModuleFileNameExA
(
proc
,
mxsnap
[
i
].
modules
[
j
],
buffer
,
sizeof
(
buffer
));
ok
(
ret
,
"GetModuleFileNameEx failed: %lu (%u/%lu=%p)
\n
"
,
GetLastError
(),
j
,
mxsnap
[
i
].
num_modules
,
mxsnap
[
i
].
modules
[
j
]);
memset
(
&
info
,
0
,
sizeof
(
info
));
ret
=
GetModuleInformation
(
proc
,
mxsnap
[
i
].
modules
[
j
],
&
info
,
sizeof
(
info
));
todo_wine_if
(
fail
)
{
ok
(
ret
,
"GetModuleInformation failed: %lu
\n
"
,
GetLastError
());
ok
(
info
.
lpBaseOfDll
==
mxsnap
[
i
].
modules
[
j
],
"expected %p, got %p
\n
"
,
mxsnap
[
i
].
modules
[
j
],
info
.
lpBaseOfDll
);
ok
(
info
.
SizeOfImage
,
"image size was 0
\n
"
);
/* info.EntryPoint to be checked */
}
}
winetest_pop_context
();
}
...
...
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