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
c66e8760
Commit
c66e8760
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 GetModuleFileNameEx succeed on 64bit modules in wow64.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
07efff4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
debug.c
dlls/kernelbase/debug.c
+9
-7
psapi_main.c
dlls/psapi/tests/psapi_main.c
+0
-1
No files found.
dlls/kernelbase/debug.c
View file @
c66e8760
...
...
@@ -1409,7 +1409,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetModuleFileNameExA( HANDLE process, HMODULE mod
DWORD
WINAPI
DECLSPEC_HOTPATCH
GetModuleFileNameExW
(
HANDLE
process
,
HMODULE
module
,
WCHAR
*
name
,
DWORD
size
)
{
BOOL
wow64
;
BOOL
wow64
,
found
=
FALSE
;
DWORD
len
;
if
(
!
size
)
return
0
;
...
...
@@ -1420,13 +1420,15 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetModuleFileNameExW( HANDLE process, HMODULE mod
{
LDR_DATA_TABLE_ENTRY32
ldr_module32
;
if
(
!
get_ldr_module32
(
process
,
module
,
&
ldr_module32
))
return
0
;
len
=
ldr_module32
.
FullDllName
.
Length
/
sizeof
(
WCHAR
);
if
(
!
ReadProcessMemory
(
process
,
(
void
*
)(
DWORD_PTR
)
ldr_module32
.
FullDllName
.
Buffer
,
name
,
min
(
len
,
size
)
*
sizeof
(
WCHAR
),
NULL
))
return
0
;
if
(
get_ldr_module32
(
process
,
module
,
&
ldr_module32
))
{
len
=
ldr_module32
.
FullDllName
.
Length
/
sizeof
(
WCHAR
);
if
(
ReadProcessMemory
(
process
,
(
void
*
)(
DWORD_PTR
)
ldr_module32
.
FullDllName
.
Buffer
,
name
,
min
(
len
,
size
)
*
sizeof
(
WCHAR
),
NULL
))
found
=
TRUE
;
}
}
else
if
(
!
found
)
{
LDR_DATA_TABLE_ENTRY
ldr_module
;
...
...
dlls/psapi/tests/psapi_main.c
View file @
c66e8760
...
...
@@ -243,7 +243,6 @@ static BOOL test_EnumProcessModulesEx_snapshot(HANDLE proc, struct moduleex_snap
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
));
todo_wine_if
(
fail
)
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
));
...
...
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