Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
116c718a
Commit
116c718a
authored
May 20, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Extend VirtualAllocEx() tests.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ff13b8be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
virtual.c
dlls/kernel32/tests/virtual.c
+11
-1
No files found.
dlls/kernel32/tests/virtual.c
View file @
116c718a
...
@@ -78,11 +78,21 @@ static void test_VirtualAllocEx(void)
...
@@ -78,11 +78,21 @@ static void test_VirtualAllocEx(void)
char
*
src
,
*
dst
;
char
*
src
,
*
dst
;
SIZE_T
bytes_written
=
0
,
bytes_read
=
0
,
i
;
SIZE_T
bytes_written
=
0
,
bytes_read
=
0
,
i
;
void
*
addr1
,
*
addr2
;
void
*
addr1
,
*
addr2
;
BOOL
b
;
BOOL
b
,
ret
;
DWORD
old_prot
;
DWORD
old_prot
;
MEMORY_BASIC_INFORMATION
info
;
MEMORY_BASIC_INFORMATION
info
;
HANDLE
hProcess
;
HANDLE
hProcess
;
/* Same process */
addr1
=
VirtualAllocEx
(
GetCurrentProcess
(),
NULL
,
alloc_size
,
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
);
ok
(
!!
addr1
,
"Failed to allocated, error %lu.
\n
"
,
GetLastError
());
ret
=
VirtualFreeEx
(
NULL
,
addr1
,
0
,
MEM_RELEASE
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Unexpected value %d, error %lu.
\n
"
,
ret
,
GetLastError
());
addr2
=
VirtualAllocEx
(
NULL
,
NULL
,
alloc_size
,
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
);
ok
(
!
addr2
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Unexpected value %p, error %lu.
\n
"
,
addr2
,
GetLastError
());
ret
=
VirtualFreeEx
(
GetCurrentProcess
(),
addr1
,
0
,
MEM_RELEASE
);
ok
(
ret
,
"Unexpected value %d, error %lu.
\n
"
,
ret
,
GetLastError
());
hProcess
=
create_target_process
(
"sleep"
);
hProcess
=
create_target_process
(
"sleep"
);
ok
(
hProcess
!=
NULL
,
"Can't start process
\n
"
);
ok
(
hProcess
!=
NULL
,
"Can't start process
\n
"
);
...
...
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