Uninstalling a device

Hi All
I am interested to uninstall a device in the same way like it is done from the Device Manager (right click on the device -> Uninstall). If you do this from the Device Manager, the PnP Manager removes the FDO and ignores the PDO until the bus driver gets another IRP_MN_QUERY_DEVICE_RELATIONS. If the PDO is reported again in the next DeviceRelations, a new FDO is created for it. However, I could not find a way to do the same from the driver code. If the bus driver does not report the PDO once and then reports it again, the PnP Manager ignores it and no FDO is created. Is there another way to uninstall the device and reinstall it later?

Thanks,
Gregory

Look at what the ‘devcon’ sample can do (in the ‘setup’ section of DDK
samples). It is very powerful in listing/installing/removing/restarting
devices. However, this is user-mode stuff.

Mat

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gregory Dardyk
Sent: Thursday, November 06, 2003 5:10 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Uninstalling a device

Hi All
I am interested to uninstall a device in the same way like it is done
from the Device Manager (right click on the device -> Uninstall). If you
do this from the Device Manager, the PnP Manager removes the FDO and
ignores the PDO until the bus driver gets another
IRP_MN_QUERY_DEVICE_RELATIONS. If the PDO is reported again in the next
DeviceRelations, a new FDO is created for it. However, I could not find
a way to do the same from the driver code. If the bus driver does not
report the PDO once and then reports it again, the PnP Manager ignores
it and no FDO is created. Is there another way to uninstall the device
and reinstall it later?

Thanks,
Gregory


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@cvdsinc.com
To unsubscribe send a blank email to xxxxx@lists.osr.com