Hi,
I’m attempting to programmatically remove a filter driver that is
attached to a working device. I’m removing the LowerFilter string
entry from the registry with the SetupDi* functions, restarting the
device with DIF_PROPERTYCHANGE, then removing my driver service with
DeleteService().
On Windows 2000 this all works as expected, but on XP and 2003 the
device I’m attached to is flagged for removal
(DN_WILL_BE_REMOVED) after I delete my own driver service. Rebooting
removes and then re-detects the target device as it reported, but this
flushes out any other filters/settings on the original device. I’ve
also tried disabling the target device before removing my service, but
as soon as I call CloseServiceHandle() after DeleteService() on
myself, the device I was attached to completely disappears!
How does the system know I previously had something to do with the
device? More importantly, why is the underlying device being flagged
for deletion when I’ve got nothing more to do with it?
Si
Si,
I’ve experienced the same issue with the filter driver of mine.
Actually, it does work on Win2k, WinXP Gold and WinXP SP1.
Started failing on the SP2 betas and the SP2 proper. Clearly
a Microsoft bug, in my opinion. I worked around it by not
deleting the service until after the reboot. Actually, you may
not need to remove it at all since your filter driver will not be
started unless it’s configured as a filter somewhere.
Would be nice to hear from the Microsoft folks on this problem.
Thanks,
Ilya Faenson
Rockville, MD USA
xxxxx@hotmail.com
-----Original Message-----
Subject: Problem removing filter driver on XP/2003
From: Simon
Date: Wed, 13 Oct 2004 11:13:43 +0100
X-Message-Number: 5
Hi,
I’m attempting to programmatically remove a filter driver that is
attached to a working device. I’m removing the LowerFilter string
entry from the registry with the SetupDi* functions, restarting the
device with DIF_PROPERTYCHANGE, then removing my driver service with
DeleteService().
On Windows 2000 this all works as expected, but on XP and 2003 the
device I’m attached to is flagged for removal
(DN_WILL_BE_REMOVED) after I delete my own driver service. Rebooting
removes and then re-detects the target device as it reported, but this
flushes out any other filters/settings on the original device. I’ve
also tried disabling the target device before removing my service, but
as soon as I call CloseServiceHandle() after DeleteService() on
myself, the device I was attached to completely disappears!
How does the system know I previously had something to do with the
device? More importantly, why is the underlying device being flagged
for deletion when I’ve got nothing more to do with it?
Si