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
e01643af
Commit
e01643af
authored
Apr 12, 2012
by
Alexander Morozov
Committed by
Alexandre Julliard
Apr 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add a test for creating named mapping after closing without unmapping.
parent
27597799
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
virtual.c
dlls/kernel32/tests/virtual.c
+32
-0
No files found.
dlls/kernel32/tests/virtual.c
View file @
e01643af
...
...
@@ -780,6 +780,38 @@ static void test_MapViewOfFile(void)
"got %u, expected ERROR_INVALID_ADDRESS
\n
"
,
GetLastError
());
ok
(
VirtualFree
(
addr
,
0
,
MEM_RELEASE
),
"VirtualFree failed
\n
"
);
/* close named mapping handle without unmapping */
name
=
"Foo"
;
SetLastError
(
0xdeadbeef
);
mapping
=
CreateFileMappingA
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READWRITE
,
0
,
MAPPING_SIZE
,
name
);
ok
(
mapping
!=
0
,
"CreateFileMappingA failed with error %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_WRITE
,
0
,
0
,
0
);
ok
(
ptr
!=
NULL
,
"MapViewOfFile failed with error %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
map2
=
OpenFileMappingA
(
FILE_MAP_READ
,
FALSE
,
name
);
ok
(
map2
!=
0
,
"OpenFileMappingA failed with error %d
\n
"
,
GetLastError
()
);
CloseHandle
(
map2
);
CloseHandle
(
mapping
);
SetLastError
(
0xdeadbeef
);
map2
=
OpenFileMappingA
(
FILE_MAP_READ
,
FALSE
,
name
);
todo_wine
ok
(
map2
==
0
,
"OpenFileMappingA succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"OpenFileMappingA set error %d
\n
"
,
GetLastError
()
);
CloseHandle
(
map2
);
SetLastError
(
0xdeadbeef
);
mapping
=
CreateFileMappingA
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READWRITE
,
0
,
MAPPING_SIZE
,
name
);
ok
(
mapping
!=
0
,
"CreateFileMappingA failed
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"CreateFileMappingA set error %d
\n
"
,
GetLastError
()
);
CloseHandle
(
mapping
);
SetLastError
(
0xdeadbeef
);
ret
=
UnmapViewOfFile
(
ptr
);
ok
(
ret
,
"UnmapViewOfFile failed with error %d
\n
"
,
GetLastError
()
);
}
static
void
test_NtMapViewOfSection
(
void
)
...
...
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