From: Ilya Konstantinov on
Hello,
I have a question.

If my filter driver elects not to filter a certain PDO (e.g. it
retrieves some PDO property through IoGetDeviceProperty and figures
out the device should not be filtered), what should it do?
1) Return STATUS_UNSUCCESSFUL, or
2) Simply return STATUS_SUCCESSFUL before doing any IoCreateDevice

And anyway, is it legit to call IoGetDeviceProperty on the
PhysicalDeviceObject at this point?

Thanks.
From: Don Burn on
Just return STATUS_SUCCESS but do not attach to the device stack. If you
return a failure code the whole device stack will be torn down.


--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Ilya Konstantinov" <ilya.konstantinov(a)gmail.com> wrote in message
news:a26c0832-07ce-4550-af9a-77adbffe9f17(a)a31g2000yqn.googlegroups.com...
> Hello,
> I have a question.
>
> If my filter driver elects not to filter a certain PDO (e.g. it
> retrieves some PDO property through IoGetDeviceProperty and figures
> out the device should not be filtered), what should it do?
> 1) Return STATUS_UNSUCCESSFUL, or
> 2) Simply return STATUS_SUCCESSFUL before doing any IoCreateDevice
>
> And anyway, is it legit to call IoGetDeviceProperty on the
> PhysicalDeviceObject at this point?
>
> Thanks.
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4618 (20091118) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4618 (20091118) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




From: Scott Noone on
> If my filter driver elects not to filter a certain PDO (e.g. it
> retrieves some PDO property through IoGetDeviceProperty and figures
> out the device should not be filtered), what should it do?

Just return STATUS_SUCCESS. If you return a failure value then you're going
to prevent the device stack from being built.

> And anyway, is it legit to call IoGetDeviceProperty on the
> PhysicalDeviceObject at this point?

Absolutely.

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com


"Ilya Konstantinov" <ilya.konstantinov(a)gmail.com> wrote in message
news:a26c0832-07ce-4550-af9a-77adbffe9f17(a)a31g2000yqn.googlegroups.com...
> Hello,
> I have a question.
>
> If my filter driver elects not to filter a certain PDO (e.g. it
> retrieves some PDO property through IoGetDeviceProperty and figures
> out the device should not be filtered), what should it do?
> 1) Return STATUS_UNSUCCESSFUL, or
> 2) Simply return STATUS_SUCCESSFUL before doing any IoCreateDevice
>
> And anyway, is it legit to call IoGetDeviceProperty on the
> PhysicalDeviceObject at this point?
>
> Thanks.