Hi,
I am wondering if there is a way to stop a user process from being able to
map a section of a file once it has it open. Let’s say that one process
(maybe WORD) has the file open and has some or all of it mapped to memory.
Now, a second process comes along that I don’t want to access the data (in
the cache). Obviously, I can force any read/write irps it sends to be
non-cached but is there any way I can stop it from mapping onto the data in
memory ?
Any ideas gratefully received.
Kind Regards,
Trevor Heartfield.
Never used it but perhaps FS_LockFile( PIOREQ pir ) is what you are looking for.
The steps I used to find it are
- Know of Win32 equivalent LockFile (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/lockfile.asp)
- Search for Lock in online DDK (thanks OSR)
- Found link to FS_LockFile
FS_LockFile’s documentation includes the statement “File record lock and unlock is performed through FS_LockFile. This routine handles the Win32 functions: LockFile(), and UnlockFile(); and INT 21h function:”. To me that suggests that it will do what you need. As to how to use it I have no idea. I’m guessing that the reason I have never even heard of a PIOREQ structure is that I haven’t been lucky enough to play file system developer yet.
The reason I outlined the steps is to allow you to give some weighting to the information. By that I mean, this isn’t something I know. It is an educated guess.
Hopefully it helps though.
Richard McNally
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Trevor Heartfield
Sent: Saturday, January 22, 2005 2:54 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Is it possible to stop a user process from mapping a
section of a file ?
Hi,
I am wondering if there is a way to stop a user process from being able to
map a section of a file once it has it open. Let’s say that one process
(maybe WORD) has the file open and has some or all of it mapped to memory.
Now, a second process comes along that I don’t want to access the data (in
the cache). Obviously, I can force any read/write irps it sends to be
non-cached but is there any way I can stop it from mapping onto the data in
memory ?
Any ideas gratefully received.
Kind Regards,
Trevor Heartfield.
Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@dsto.defence.gov.au
To unsubscribe send a blank email to xxxxx@lists.osr.com