waiting indefinite time inside the driver

Hello All,

I am writing a FileSystemMiniFilter driver.i have PFLT_PRE_OPERATION_CALLBACK routine for the IRP_MJ_VOLUME_MOUNT .In this preOperation call back i want communicate with an user mode application and get some reply from user mode application . So the problem is how can i wait for this operation in my driver for indefinite time ,since user mode application will wait for user input. i was trying to use FLT_PREOP_PENDING but the problem is it can be used only with IRP-based I/O operations. I look forward to hearing from you soon

Regards

N Madhavan

You can always stall the requesting thread by waiting it on an object
(usually an event). This is often not what you want because if you are
called from a critical thread (like a part of the GUI), the GUI will freeze.

Posting the IRP is a lot better - remember you can force the IRP path by
saying FLT_PREOP_DISALLOW_FASTIO.

Note: I’m pretty sure that there isn’t a system level fastio call which ends
up as IRP_MJ_VOLUME_MOUNT. Of course FltMgr would be within its rights in
simulating one so defensive code is probably a good idea.

wrote in message news:xxxxx@ntfsd…
> Hello All,
>
> I am writing a FileSystemMiniFilter driver.i have
> PFLT_PRE_OPERATION_CALLBACK routine for the IRP_MJ_VOLUME_MOUNT .In this
> preOperation call back i want communicate with an user mode application
> and get some reply from user mode application . So the problem is how can
> i wait for this operation in my driver for indefinite time ,since user
> mode application will wait for user input. i was trying to use
> FLT_PREOP_PENDING but the problem is it can be used only with IRP-based
> I/O operations. I look forward to hearing from you soon
>
> Regards
>
> N Madhavan
>

Hi Rod,

You’re right, IRP_MJ_VOLUME_MOUNT is not a real operation on the system, it’s a fake FAST_IO created by filter manager to show volume mounts to minifilters. The reason it is a FAST_IO is because it needs to be synchronous. So if you want to wait for user input your only option (that I know of) is to block the mounting thread by waiting inline.

Regards,
Alex.
This posting is provided “AS IS” with no warranties, and confers no rights.