The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
I've run up against a brick wall, and am hoping someone here can give me some advice. You know that File Object that the Cache Manager (not sure if that is technically accurate) latches onto to use for internal file management, caching, etc.? I need that to go away for a specified file that has no other open handles to it. I believe what I am looking to do is to evict that file from cache so that Cc will release the file object.
I need to do this for two reasons:
One is that the information in the stream context is out of date. I don't want to have to make marks on the wall to try to catch stream context for file X and then add locking to perform the update. I'd like to just have it go away, and the next time the file is accessed, start anew, peacefully, in PostCreate.
The other is that I process the data as it is read into the cache, and I need to redo that processing for the file based on new configuration.
I thought I had found the answer in CcCoherencyFlushAndPurgeCache(). Based on the documentation, I thought that I could invoke one of the Acquire For IRPs to acquire the file, and then call this function. But I have read through many an old post here and the advice is always the same, "Thou Shalt Not Call Cc functions for objects that you don't own."
So that is my rock. What advice do you have Mr. Hard Place?
|Upcoming OSR Seminars|
|OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!|
|Internals & Software Drivers||30 Nov 2020||LIVE ONLINE|
|Writing WDF Drivers||7 Dec 2020||LIVE ONLINE|
|Developing Minifilters||Early 2021||LIVE ONLINE|