I’m pretty sure you problem is that you’re using a handle in an invalid
process context. Please take a look at the IRP_MJ_SET_INFORMATION page
(currently at http://msdn.microsoft.com/en-us/library/ff549366(v=vs.85).aspx
http: ). There
is a member IrpSp->Parameters.SetFile.DeleteHandle, which is not documented.
I’m not sure what the deal is with that handle but I expect it’s a user
process handle and your pending and resuming in a different process context
makes that problematic.
Could you please try something ?
Instead of resuming the operation in a different process context by calling
FltCompletePendedPreOperation() with STATUS_SUCCESS_Xxx_CALLBACK, could you
please try to call FltSetInformationFile on the FILE_OBJECT yourself with
the same disposition and when FltSetInformationFIle returns you complete the
original request with FltCompletePendedPreOperation() and FLT_PREOP_COMPLETE
(you need to also set the status returned from FltSetInformationFile in the
FLT_CALLBACK_DATA) ?
Thanks,
Alex.</http:>