where and how can i set a completion of a disk filter driver?

I want to write a disk filter driver which can decrypt some special
cdrom on fly. You might ask me why i need a disk filter but not a file
system filter driver? The answer is that, if i use file system filter
driver, i’ll have to set a completion routine in my filter’s IRP_MJ_READ
routine, so, the routine might be easy to be hooked by a third-party
filter. In addition, if i use a disk filter other than fs filter, the
driver would be more convenient to extend, right?
I have seen a disk filter driver do some similar task with me, but i
have no source code of it and can’t modify it to fit my requirement.

Because it’s a disk driver, so it will not receive IRP_MJ_READ irp when
the user app call ReadFile to read data from the disc. So, where and
when i can set a completion routine to hold the data read from the disc
by the lower disk driver?

Thanks.

> driver, i’ll have to set a completion routine in my filter’s IRP_MJ_READ

routine, so, the routine might be easy to be hooked by a third-party
filter.

You cannot protect against such “core wars”, period. The only thing which you can do trying to protect against such is to crash the OS.

Because it’s a disk driver, so it will not receive IRP_MJ_READ irp when
the user app call ReadFile to read data from the disc.

This is wrong.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com