Hello,
I am a newbie having read and tried the example minifilters in the IFS kit. I am writing a minifilter trying to increase the file size (need to show the user that file is of less size than what it actually is.). As I understand I can change the file size during cached write (called by api WriteFile) and cached setinformation (Called by api SetEndOfFile) by changing the write length and changing the end of file respectively.
Now WriteFile and SetEndOfFile can be called in various ways (or only one of those can be called) and in any order and from multiple threads.
How should I keep track of whether I have increased the file size and when.
Thanks,
Trav
Got a little couch potato?
Check out fun summer activities for kids.
Hi,
Is this a stupid question? Please provide me with some help.
Regards,
Trav
travis friend wrote:
Hello,
I am a newbie having read and tried the example minifilters in the IFS kit. I am writing a minifilter trying to increase the file size (need to show the user that file is of less size than what it actually is.). As I understand I can change the file size during cached write (called by api WriteFile) and cached setinformation (Called by api SetEndOfFile) by changing the write length and changing the end of file respectively.
Now WriteFile and SetEndOfFile can be called in various ways (or only one of those can be called) and in any order and from multiple threads.
How should I keep track of whether I have increased the file size and when.
Thanks,
Trav
---------------------------------
Got a little couch potato?
Check out fun summer activities for kids. — Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are currently subscribed to ntfsd as: xxxxx@yahoo.com To unsubscribe send a blank email to xxxxx@lists.osr.com
---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.
> As I understand I can change the file size during cached write (called by api WriteFile) and cached setinformation (Called by api SetEndOfFile) by changing the write length and changing the end of file respectively.
You understand it correctly. But be careful, if for example the thread’s top level Irp( IoGetTopLevelIrp() ) is not NULL then it is dangerous to issue any request or to stop this thread( waiting for completing of a request issued from another thread ) - this can results in a deadlock.
Now WriteFile and SetEndOfFile can be called in various ways (or only one of those can be called) and in any order and from multiple threads.
How should I keep track of whether I have increased the file size and when.
The actual syncronization takes place only when the request reaches FSD, so if there is a sequence of requests you hardly will be able to say something confident about the file size. Though, you can serialize all non-paging set-file-size requests in your filter, this should not cause any deadlocks .
–
Slava Imameyev, xxxxx@hotmail.com
“travis friend” wrote in message news:xxxxx@ntfsd…
Hello,
I am a newbie having read and tried the example minifilters in the IFS kit. I am writing a minifilter trying to increase the file size (need to show the user that file is of less size than what it actually is.). As I understand I can change the file size during cached write (called by api WriteFile) and cached setinformation (Called by api SetEndOfFile) by changing the write length and changing the end of file respectively.
Now WriteFile and SetEndOfFile can be called in various ways (or only one of those can be called) and in any order and from multiple threads.
How should I keep track of whether I have increased the file size and when.
Thanks,
Trav
------------------------------------------------------------------------------
Got a little couch potato?
Check out fun summer activities for kids.