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,
It looks like you're new here. If you want to get involved, click one of these buttons!
|Upcoming OSR Seminars|
|Writing WDF Drivers||21 Oct 2019||OSR Seminar Space & ONLINE|
|Internals & Software Drivers||18 Nov 2019||Dulles, VA|
|Kernel Debugging||30 Mar 2020||OSR Seminar Space|
|Developing Minifilters||27 Apr 2020||OSR Seminar Space & ONLINE|