kernel32: Add a test for rw mapping of a read-only section.

This commit is contained in:
Dmitry Timoshkov 2007-09-19 20:01:22 +09:00 committed by Alexandre Julliard
parent b6f9a30a5d
commit c6b7f7ccbe
1 changed files with 11 additions and 0 deletions

View File

@ -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,