MiniFilter

Hi
I am new in driver development, so sorry for asking a basic question.

In my minifilter I need to add restriction that the driver instance should not attach to operating system drive / volume.

I am trying in the InstanceSetup method, but I am not able to get the drive/volume information. tried FltObjects->Volume but cannot work out.

And also I want to do specific task in the PreOperation method if the IO operation is on a file which is in operating system drive.

Can any one please point me to right direction.

Thanks

Just use this flag FLTFL_INSTANCE_SETUP_AUTOMATIC_ATTACHMENT and if true return STATUS_FLT_DO_NOT_ATTACH; but it will not attach to any volume at all then you need to do some work regarding attaching to specific volume.as per my understanding that attachment is known as on demand attachment.

Hope this may help.

HiYes that’s what I am trying to do,
If the volume is operating system volume then return STATUS_FLT_DO_NOT_ATTACH other wise return STATUS_SUCCESS.Now I am working how to get the volume details from FltObjects->Volume.
I have tried this code;
PVOLUME_CONTEXT volCtx = NULL; NTSTATUS status;
status = FltGetVolumeContext(FltObjects->Filter, FltObjects->Volume, &volCtx);
But volCtx is always NULL, any help please.
Thanks

Date: Sat, 9 May 2015 01:24:38 -0400
From: xxxxx@gmail.com
To: xxxxx@lists.osr.com
Subject: RE:[ntfsd] MiniFilter

Just use this flag FLTFL_INSTANCE_SETUP_AUTOMATIC_ATTACHMENT and if true return STATUS_FLT_DO_NOT_ATTACH; but it will not attach to any volume at all then you need to do some work regarding attaching to specific volume.as per my understanding that attachment is known as on demand attachment.

Hope this may help.


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

from msdn := “The *FltGetVolumeContext* routine retrieves a context that
was set for a volume by a given minifilter driver.”

please check if you set this context .

you should try FltGetDiskDeviceObject and flags of returned device object.

On Sat, May 9, 2015 at 4:38 PM, Haseeb Mukhtar.
wrote:

> Hi
> Yes that’s what I am trying to do,
>
> If the volume is operating system volume then
> return STATUS_FLT_DO_NOT_ATTACH other wise return STATUS_SUCCESS.
> Now I am working how to get the volume details from FltObjects->Volume.
>
> I have tried this code;
>
> PVOLUME_CONTEXT volCtx = NULL;
> NTSTATUS status;
>
> status = FltGetVolumeContext(FltObjects->Filter,
> FltObjects->Volume,
> &volCtx);
>
> But volCtx is always NULL, any help please.
>
> Thanks
>
>
> > Date: Sat, 9 May 2015 01:24:38 -0400
> > From: xxxxx@gmail.com
> > To: xxxxx@lists.osr.com
> > Subject: RE:[ntfsd] MiniFilter
>
> >
> > Just use this flag FLTFL_INSTANCE_SETUP_AUTOMATIC_ATTACHMENT and if true
> return STATUS_FLT_DO_NOT_ATTACH; but it will not attach to any volume at
> all then you need to do some work regarding attaching to specific
> volume.as per my understanding that attachment is known as on demand
> attachment.
> >
> > Hope this may help.
> >
> >
> > —
> > NTFSD is sponsored by OSR
> >
> > OSR is hiring!! Info at http://www.osr.com/careers
> >
> > For our schedule of debugging and file system seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTFSD is sponsored by OSR
>
> OSR is hiring!! Info at http://www.osr.com/careers
>
> For our schedule of debugging and file system seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


मनीष आनंद सामरिया
Maneesh Anand.Samria