Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
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/
Hello. As the title implied, I have a problem in opening file in the callback of IRP_MJ_SET_INFORMATION post operation.
My project is inherited from Microsoft "scanner" minifilter project in github.
I want to open file after the file is renamed. So I registered callbacks to IRP_MJ_SET_INFORMATION event.
Originally I tried to open a file in pre operation callback. But file handler is not fully released, so failed in opening file.
So I tried to open file in post operation of IRP_MJ_SET_INFORMATION event. But still can not open file.
What should I do if I want to open file in that callback?
Thanks in advance.
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 | 7 February 2022 | Live, Online |
Kernel Debugging | 21 March 2022 | Live, Online |
Developing Minifilters | 23 May 2022 | Live, Online |
Writing WDF Drivers | 12 September 2022 | Live, Online |
Comments
Thanks for your reply.
Driver mode send file path to user mode. Then, user mode tries to open that file using "fopen". GetLastError returns 32. It means:ERROR_SHARING_VIOLATION The process cannot access the file because it is being used by another process.
BTW, Is there any way to giveup file access privilege so other process can access that file in minifilter?