How can I attach filter driver to a DVD volume as soon as the disk is inserted?

Hi all:
How can I attach filter driver to a DVD volume at the same time as the media is inserted?

I have briefly read and tried the sample drivers provided by Microsoft IFS. For the filespy sample, I cannot monitor the CDROM volume at the same time when CD is inserted, and I have to use /a (driver letter) command to do this. The same thing happened in the sfilter sample. I guess the same problem exists in the FileMon 7.0.3.

Is there anyway that I can solve this problem?

According to the IFS document, I should intercept the IRP_MJ_FILE_SYSTEM_CONTROL major IRP and attach the filter driver if IRP_MN_MOUNT_VOLUME minor code is observed. But I failed to get any IRP_MJ_FILE_SYSTEM_CONTROL IRP from my device control object (CDO) when CDROM is inserted…

Could anybody help me on this?

Thanks!

Wang Cheng

>The same thing happened in the sfilter sample
Your statement is incorrect…take a look at SfMountCompletion

But I failed to get any IRP_MJ_FILE_SYSTEM_CONTROL IRP from my device
control object
Of course, the IRPs will be sent to your filter device and not to your
control device.

schrieb im Newsbeitrag news:xxxxx@ntfsd…
> Hi all:
> How can I attach filter driver to a DVD volume at the same time as the
> media is inserted?
>
> I have briefly read and tried the sample drivers provided by Microsoft
> IFS. For the filespy sample, I cannot monitor the CDROM volume at the same
> time when CD is inserted, and I have to use /a (driver letter) command to
> do this. The same thing happened in the sfilter sample. I guess the same
> problem exists in the FileMon 7.0.3.
>
> Is there anyway that I can solve this problem?
>
> According to the IFS document, I should intercept the
> IRP_MJ_FILE_SYSTEM_CONTROL major IRP and attach the filter driver if
> IRP_MN_MOUNT_VOLUME minor code is observed. But I failed to get any
> IRP_MJ_FILE_SYSTEM_CONTROL IRP from my device control object (CDO) when
> CDROM is inserted…
>
> Could anybody help me on this?
>
> Thanks!
>
> Wang Cheng
>