Modify Memory Mapped Files on the fly

Hi:

Can anybody give me some general steps about modifying memory mapped files
on the fly?. I mean, how to modify the content of the memory mapped file so
that Nopepad (or any other application) shows the modified content instead
of the original.

Well I’m despetate with this problem and I couldn’t get any answer. Does
anybody know where (who) can I ask for help? Any suggestion will be welcome.

Thanks in advance

Pablo Frank

Usually an application that opens a file for memory-mapping will not
specify FILE_SHARE_WRITE when they open; otherwise, you could map your
own view of the file in another process and scribble on it (both
processes are sharing the same physical pages). If you have a driver you
can bypass the share access checks, but it’s very rude to walk all over
somebody else’s memory mapping when they assume they have exclusive
write access to the file.

Pablo G. Frank wrote:

Hi:

Can anybody give me some general steps about modifying memory mapped files
on the fly?. I mean, how to modify the content of the memory mapped file so
that Nopepad (or any other application) shows the modified content instead
of the original.

Well I’m despetate with this problem and I couldn’t get any answer. Does
anybody know where (who) can I ask for help? Any suggestion will be welcome.

Thanks in advance

Pablo Frank


Nick Ryan (MVP for DDK)

Filter the noncached read path. Note that this will alter the content for
all users and not only mmaped files.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Pablo G. Frank”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, December 16, 2003 11:36 PM
Subject: [ntfsd] Modify Memory Mapped Files on the fly

> Hi:
>
> Can anybody give me some general steps about modifying memory mapped files
> on the fly?. I mean, how to modify the content of the memory mapped file so
> that Nopepad (or any other application) shows the modified content instead
> of the original.
>
> Well I’m despetate with this problem and I couldn’t get any answer. Does
> anybody know where (who) can I ask for help? Any suggestion will be welcome.
>
> Thanks in advance
>
> Pablo Frank
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Please note that, even if you do manage to get access to the same mapped
pages, Notepad probably will not necessarily update the contents of its
view (the window). Notepad is not a “dynamic” file viewer.

– arlie

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pablo G. Frank
Sent: Tuesday, December 16, 2003 3:36 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Modify Memory Mapped Files on the fly

Hi:

Can anybody give me some general steps about modifying memory mapped
files on the fly?. I mean, how to modify the content of the memory
mapped file so that Nopepad (or any other application) shows the
modified content instead of the original.

Well I’m despetate with this problem and I couldn’t get any answer. Does
anybody know where (who) can I ask for help? Any suggestion will be
welcome.

Thanks in advance

Pablo Frank


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@sublinear.org To
unsubscribe send a blank email to xxxxx@lists.osr.com

Hi:

Thanks, very much, for your comment.

Well files are readonly, so there’s no problem modifying the content. In
short, users must see only the mapped content and never the original one,
and they won’t be able to modify it.

How do you think I can open my own view?. Using ZwOpenSection?. Any other
suggestion?

Thanks in advance.

Best regards.

Pablo Frank

“Nick Ryan” escribió en el mensaje news:xxxxx@ntfsd…
>
> Usually an application that opens a file for memory-mapping will not
> specify FILE_SHARE_WRITE when they open; otherwise, you could map your
> own view of the file in another process and scribble on it (both
> processes are sharing the same physical pages). If you have a driver you
> can bypass the share access checks, but it’s very rude to walk all over
> somebody else’s memory mapping when they assume they have exclusive
> write access to the file.
>
> Pablo G. Frank wrote:
>
> > Hi:
> >
> > Can anybody give me some general steps about modifying memory mapped
files
> > on the fly?. I mean, how to modify the content of the memory mapped file
so
> > that Nopepad (or any other application) shows the modified content
instead
> > of the original.
> >
> > Well I’m despetate with this problem and I couldn’t get any answer. Does
> > anybody know where (who) can I ask for help? Any suggestion will be
welcome.
> >
> > Thanks in advance
> >
> > Pablo Frank
> >
> >
> >
> >
>
> –
> Nick Ryan (MVP for DDK)
>
>
>