myrkraverk
23.11.2010, 01:04 |
HX and memory mapped writable files. (DOSX) |
Hi all,
I just tested memory mapping to write a file with HX and the file is either not created or not written to (I don't recall) when the map is not explicitly closed by the application. Is that a bug in HX?
More explicitly, using CreateFile(), CreateFileMapping() and MapViewOfFile() for writing, the file isn't written without
UnmapViewOfFile( map );
CloseHandle( mapping );
CloseHandle( f );
I just added all three since and so I do not know if only one or all three are needed.
Wine creates the file without this explicit closing. I did not test on NT itself.
Johann |
Japheth
Germany (South), 23.11.2010, 09:04
@ myrkraverk
|
HX and memory mapped writable files. |
> I just added all three since and so I do not know if only one or all three
> are needed.
I did look into the source and AFAICS it isn't necessary to close the file handle - this is done automatically when the mapping object is closed.
> Wine creates the file without this explicit closing. I did not test on NT
> itself.
I will test if the file is created without unmapping/closing the mapping object. --- MS-DOS forever! |