I like to be able to modify the content of "pBuf" without modifying the content of the file. what would be the options, if that would be possible at all?.
pBuf = (LPTSTR) MapViewOfFile(hMapFile, // handle to map object
FILE_MAP_ALL_ACCESS, // read/write permission
highDWordVal,
lowDWordVal,
BUF_SIZE1); //BUF_SIZE);
johans22
0
Newbie Poster
Recommended Answers
Jump to PostYou need to create a 'copy on write' view.
Open the file for read access:
CreateFile( ...., GENERIC_READ, .... ) ;
Create the FileMapping for read access:CreateFileMapping( ....., PAGE_READONLY, ..... ) ;
Create a copy-on-write view:MapViewOfFile( ......, [b]FILE_MAP_COPY[/b], ..... ) ;
Unix:mmap( ...., PROT_READ|PROT_WRITE, [b]MAP_PRIVATE[/b], .... …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.