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
572cc841
Commit
572cc841
authored
Aug 17, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add some more tests for the contents of the WOW64INFO structure.
parent
626f8d75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 deletions
+31
-7
wow64.c
dlls/ntdll/tests/wow64.c
+22
-0
winternl.h
include/winternl.h
+9
-7
No files found.
dlls/ntdll/tests/wow64.c
View file @
572cc841
...
...
@@ -414,6 +414,28 @@ static void test_peb_teb(void)
}
ok
(
i
<
limit
,
"wow64info not found in PEB
\n
"
);
}
if
(
wow64info
->
SectionHandle
&&
wow64info
->
CrossProcessWorkList
)
{
HANDLE
handle
;
void
*
data
,
*
addr
=
NULL
;
SIZE_T
size
=
0
;
ret
=
DuplicateHandle
(
pi
.
hProcess
,
(
HANDLE
)(
ULONG_PTR
)
wow64info
->
SectionHandle
,
GetCurrentProcess
(),
&
handle
,
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
);
ok
(
ret
,
"DuplicateHandle failed %lu
\n
"
,
GetLastError
()
);
status
=
NtMapViewOfSection
(
handle
,
GetCurrentProcess
(),
&
addr
,
0
,
0
,
NULL
,
&
size
,
ViewShare
,
0
,
PAGE_READWRITE
);
ok
(
!
status
,
"NtMapViewOfSection failed %lx
\n
"
,
status
);
data
=
malloc
(
size
);
ret
=
ReadProcessMemory
(
pi
.
hProcess
,
(
void
*
)(
ULONG_PTR
)
wow64info
->
CrossProcessWorkList
,
data
,
size
,
&
size
);
ok
(
ret
,
"ReadProcessMemory failed %lu
\n
"
,
GetLastError
()
);
ok
(
!
memcmp
(
data
,
addr
,
size
),
"wrong data
\n
"
);
free
(
data
);
UnmapViewOfFile
(
addr
);
CloseHandle
(
handle
);
}
else
trace
(
"no WOW64INFO section handle
\n
"
);
}
else
win_skip
(
"RtlWow64GetSharedInfoProcess not supported
\n
"
);
...
...
include/winternl.h
View file @
572cc841
...
...
@@ -4103,14 +4103,16 @@ typedef struct _WOW64_CPU_AREA_INFO
typedef
struct
_WOW64INFO
{
ULONG
NativeSystemPageSize
;
ULONG
CpuFlags
;
ULONG
Wow64ExecuteFlags
;
ULONG
unknown
[
5
];
USHORT
NativeMachineType
;
USHORT
EmulatedMachineType
;
ULONG
unknown2
;
ULONG
NativeSystemPageSize
;
ULONG
CpuFlags
;
ULONG
Wow64ExecuteFlags
;
ULONG
unknown
;
ULONGLONG
SectionHandle
;
ULONGLONG
CrossProcessWorkList
;
USHORT
NativeMachineType
;
USHORT
EmulatedMachineType
;
}
WOW64INFO
;
C_ASSERT
(
sizeof
(
WOW64INFO
)
==
40
);
#define WOW64_CPUFLAGS_MSFT64 0x01
#define WOW64_CPUFLAGS_SOFTWARE 0x02
...
...
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