Question about mapping file

If a file has been mapped into memory, can I stiill open it with ZWCreateFile and do reading or writing operation?

> If a file has been mapped into memory, can I stiill open it with

ZWCreateFile and do reading or writing operation?

As long as the opener has allowed it by specifying
FILE_SHARE_READ (or FILE_SHARE_WRITE, respectively),
you can.

L.

I believe you will find the answer in the positive; I wonder if you have
tried? If, as Ladislave points out, the current open-er has been kind enough
to share, then it is a breeze. If however the open-er has not been some
permissive, then you can anyway open for SYNCHRONIZE access, and read/write
by rolling your own irp and sending down the stack.

Hmm come to think of it, I am pretty sure this is all covered in the
excellent OSR IFS FAQ here http://www.osronline.com/article.cfm?article=17
… yeah its Q43 and it has even been updated since I read it some years
past … so this one is a bona fide RTFAQ :slight_smile:

wrote in message news:xxxxx@ntfsd…
> If a file has been mapped into memory, can I stiill open it with
> ZWCreateFile and do reading or writing operation?
>