Question on use of a filter driver

I have a question I hope the people here can help me with on using a filter driver and if using this approach is a good idea.

I have a hardware device that when connected to a PC will PnP as a CDROM using the in-OS driver. When the CDROM autoruns, it will copy some files to the user’s system and then preload a different inf that the CDROM device will get updated to use. With this new inf, I was thinking that an upper filter driver could be installed that would handle doing the following.

Send an eject command when it’s first started up.
Send an eject command anytime the device has been reconnected to the system after a surprise removal.

Does this sound like something a filter driver would be a good option to handle or would using a service that handles WM_DEVICECHANGE events be better?

If you can accomplish what you need to in user space it is safer to do
so and avoid having a filter driver. Not only is it safer, it avoids
the WHCL process as well.

FWIW and YMMV,
Robert.

On Mon, Jun 14, 2010 at 11:12 AM, <troy.ellis> wrote:
> I have a question I hope the people here can help me with on using a filter driver and if using this approach is a good idea.
>
> I have a hardware device that when connected to a PC will PnP as a CDROM using the in-OS driver. When the CDROM autoruns, it will copy some files to the user’s system and then preload a different inf that the CDROM device will get updated to use. With this new inf, I was thinking that an upper filter driver could be installed that would handle doing the following.
>
> Send an eject command when it’s first started up.
> Send an eject command anytime the device has been reconnected to the system after a surprise removal.
>
> Does this sound like something a filter driver would be a good option to handle or would using a service that handles WM_DEVICECHANGE events be better?
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other 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
>


Robert Randall | xxxxx@gmail.com</troy.ellis>