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
07efff4e
Commit
07efff4e
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 GetModuleBaseName succeed on 64bit modules in wow64.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
c56971ff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
debug.c
dlls/kernelbase/debug.c
+14
-5
psapi_main.c
dlls/psapi/tests/psapi_main.c
+0
-1
No files found.
dlls/kernelbase/debug.c
View file @
07efff4e
...
...
@@ -876,6 +876,13 @@ static BOOL get_ldr_module32( HANDLE process, HMODULE module, LDR_DATA_TABLE_ENT
struct
module_iterator
iter
;
INT
ret
;
#ifdef _WIN64
if
((
ULONG_PTR
)
module
>>
32
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
#endif
if
(
!
init_module_iterator
(
&
iter
,
process
,
TRUE
))
return
FALSE
;
while
((
ret
=
module_iterator_next
(
&
iter
))
>
0
)
...
...
@@ -1320,7 +1327,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetModuleBaseNameA( HANDLE process, HMODULE modul
DWORD
WINAPI
DECLSPEC_HOTPATCH
GetModuleBaseNameW
(
HANDLE
process
,
HMODULE
module
,
WCHAR
*
name
,
DWORD
size
)
{
BOOL
wow64
;
BOOL
wow64
,
found
=
FALSE
;
if
(
!
IsWow64Process
(
process
,
&
wow64
))
return
0
;
...
...
@@ -1328,13 +1335,15 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetModuleBaseNameW( HANDLE process, HMODULE modul
{
LDR_DATA_TABLE_ENTRY32
ldr_module32
;
if
(
!
get_ldr_module32
(
process
,
module
,
&
ldr_module32
))
return
0
;
if
(
get_ldr_module32
(
process
,
module
,
&
ldr_module32
))
{
size
=
min
(
ldr_module32
.
BaseDllName
.
Length
/
sizeof
(
WCHAR
),
size
);
if
(
!
ReadProcessMemory
(
process
,
(
void
*
)(
DWORD_PTR
)
ldr_module32
.
BaseDllName
.
Buffer
,
if
(
ReadProcessMemory
(
process
,
(
void
*
)(
DWORD_PTR
)
ldr_module32
.
BaseDllName
.
Buffer
,
name
,
size
*
sizeof
(
WCHAR
),
NULL
))
return
0
;
found
=
TRUE
;
}
else
}
if
(
!
found
)
{
LDR_DATA_TABLE_ENTRY
ldr_module
;
...
...
dlls/psapi/tests/psapi_main.c
View file @
07efff4e
...
...
@@ -241,7 +241,6 @@ static BOOL test_EnumProcessModulesEx_snapshot(HANDLE proc, struct moduleex_snap
case
LIST_MODULES_64BIT
:
break
;
}
ret
=
GetModuleBaseNameA
(
proc
,
mxsnap
[
i
].
modules
[
j
],
buffer
,
sizeof
(
buffer
));
todo_wine_if
(
fail
)
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
)
...
...
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