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 am probably missing something obvious, but so much of simple file I/O has been different in kernel mode, that it could be something bigger.
So I am trying to delete our "data cache" folder. These are our files, copies of some random files (a lot of them).
I am trying to delete those files, but for a few of them (like.. 0.001%), I get STATUS_ACCESS_DENIED when I try to open them this way:
ntRes = FltCreateFileEx(gFilter, Instance, &hFile, &lpFile, FILE_ALL_ACCESS, &ObjAttr, // We may reuse ObjAttr, as it points to szPath, which // now includes the component name. &IoSb, NULL, FILE_ATTRIBUTES_NORMAL, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, FILE_OPEN_REPARSE_POINT, NULL, 0, IO_IGNORE_SHARE_ACCESS_CHECK);
If I attempt DELETE access and FILE_DELETE_ON_CLOSE, I get STATUS_CANNOT_DELETE.
The above code is used to try and remove a possible read-only flag, but it fails.
This is during InstanceSetup at boot. Files are definitely not open by anything,
|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!||Kernel Debugging||30 Mar 2020||OSR Seminar Space|
|Developing Minifilters||15 Jun 2020||LIVE ONLINE|
|Writing WDF Drivers||22 June 2020||LIVE ONLINE|
|Internals & Software Drivers||28 Sept 2020||Dulles, VA|