Dismount volume minifilter

I need to handle disk ejection from cdrom in minifilter. I don’t receive callback for IRP_MJ_VOLUME_DISMOUNT. Also I tried to handle IRP_MJ_FILE_SYSTEM_CONTROL to receive FSCTL_DISMOUNT_VOLUME, but FsControlCode is always 0.Do you know how to handle disk ejection?

Do you know how to handle disk ejection?
No, but FAT and CDFS does. I’d check the sources. ISTR that you get some sort of verify irp down not on eject, but on first use after eject. You then get to say “Its the same” or “its changed” this may or may not help you of course.