Hi
I did a filter driver that for every file opened it reopens it and read
first 64 bytes.In IRP_MJ_CREATE routine I do:
ZwCreateFile(handle,…);
ZwReadFile(handle,…);
ZwClose(handle);
with synchronisation stuff.
In my IRP_MJ_CLEANUP dispatch routine I had something like this:
…
RC = IoCallDriver(PTargetDevObj, Irp);
…
My problem is with ZwClose(handle) from my IRP_MJ_CREATE routine .For some
files when my filter driver receive IRP_MJ_CLEANUP then the call of RC =
IoCallDriver(PTargetDevObj, Irp) hangs.I continue to receive other IRPs,but
the process which does the initial open request hangs
Why?I notice that other people had problems too with cleanup.Is there
another way to close a opened handle?