Attached is a test program that demonstrates a problem with memory mapped
files. Basically, if you try to MapViewOfFile() a part of the file at
non-zero file offset, ReactOS will still map the beginning of the file.
I think I found the cause of this, the attached .diff fixes it. My fix
uncovered another (small) problem, ViewOffset is relative to the start of
the segment, not the start of the section. So instead of passing
SectionSegments[i].VirtualAddress we need to pass 0.
I'd appreciate it if someone who actually understands the Mm stuff can take
a look at this.
Gé van Geldorp.
Show replies by date