|Subject:||MapViewOfFile throws an "access denied" error - but only on large files|
|Posted by:||R.Wieser (addre…@not.available)|
|Date:||Tue, 20 Nov 2018|
I've got some basic code opening a file map (removed all error catching):
The problem is that this works for smallish files, but when I try to open a
3 GB file the MapViewOfFile returns with an error, and GetLastError shows me
its "access denied". Which does not make any sense to me.
I've just tried to google the problem, but most of those are about coding
mistakes. And as my code seems to work perfectly for smallish files ....
The only thing I can think of is that my (old) machine doesn't have a whole
lot of memory and a 3 GBfile might simply not fit. Than again, I though
that mapping a file doesn't actally try to load everything into memory. And
besides, I would than have expected an "out of memory", not an "access
Does anyone know whats going on here ?