Hello guys,
I'm using MapViewOfFile to map a file and try to edit its data and save it on the file.
The problem I have extra data to the file required to expand its size.
So, how to append data to the end of memory mapped file using CreateFileMapping and MapViewOfFile?

Recommended Answers

Just specify a file size equal to (size of file you're mapping + size of extra data) when you call CreateFileMapping.
Read http://msdn.microsoft.com/en-au/library/windows/desktop/aa366542(v=vs.85).aspx - specifically the part about File Mapping Size.

Jump to Post

All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.