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
168ce916
Commit
168ce916
authored
Jul 11, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Use ProcessWow64Information to retrieve the 32-bit PEB.
parent
7261aca1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
syscall.c
dlls/wow64/syscall.c
+3
-2
No files found.
dlls/wow64/syscall.c
View file @
168ce916
...
...
@@ -873,7 +873,7 @@ static const WCHAR *get_cpu_dll_name(void)
*/
static
DWORD
WINAPI
process_init
(
RTL_RUN_ONCE
*
once
,
void
*
param
,
void
**
context
)
{
TEB32
*
teb32
=
(
TEB32
*
)((
char
*
)
NtCurrentTeb
()
+
NtCurrentTeb
()
->
WowTebOffset
)
;
PEB32
*
peb32
;
HMODULE
module
,
ntdll
;
UNICODE_STRING
str
=
RTL_CONSTANT_STRING
(
L"ntdll.dll"
);
SYSTEM_BASIC_INFORMATION
info
;
...
...
@@ -884,7 +884,8 @@ static DWORD WINAPI process_init( RTL_RUN_ONCE *once, void *param, void **contex
NtQuerySystemInformation
(
SystemEmulationBasicInformation
,
&
info
,
sizeof
(
info
),
NULL
);
highest_user_address
=
(
ULONG_PTR
)
info
.
HighestUserAddress
;
default_zero_bits
=
(
ULONG_PTR
)
info
.
HighestUserAddress
|
0x7fffffff
;
wow64info
=
(
WOW64INFO
*
)((
PEB32
*
)
ULongToPtr
(
teb32
->
Peb
)
+
1
);
NtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessWow64Information
,
&
peb32
,
sizeof
(
peb32
),
NULL
);
wow64info
=
(
WOW64INFO
*
)(
peb32
+
1
);
wow64info
->
NativeSystemPageSize
=
0x1000
;
wow64info
->
NativeMachineType
=
native_machine
;
wow64info
->
EmulatedMachineType
=
current_machine
;
...
...
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