mirror of
https://github.com/reactos/wine.git
synced 2024-11-27 21:50:37 +00:00
kernel32: Add a test for rw mapping of a read-only section.
This commit is contained in:
parent
b6f9a30a5d
commit
c6b7f7ccbe
@ -416,6 +416,17 @@ static void test_MapViewOfFile(void)
|
||||
|
||||
CloseHandle( file );
|
||||
DeleteFileA( testfile );
|
||||
|
||||
file = CreateFileMapping( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, "Global\\Foo");
|
||||
ok( file != 0, "CreateFileMapping PAGE_READWRITE failed\n" );
|
||||
|
||||
mapping = OpenFileMapping( FILE_MAP_READ, FALSE, "Global\\Foo" );
|
||||
ok( mapping != 0, "OpenFileMapping FILE_MAP_READ failed\n" );
|
||||
ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 0 );
|
||||
todo_wine ok( !ptr, "MapViewOfFile FILE_MAP_WRITE should fail\n" );
|
||||
CloseHandle( mapping );
|
||||
|
||||
CloseHandle( file );
|
||||
}
|
||||
|
||||
static DWORD (WINAPI *pNtMapViewOfSection)( HANDLE handle, HANDLE process, PVOID *addr_ptr,
|
||||
|
Loading…
Reference in New Issue
Block a user