Peter, Doron and Maxim,
thanks to you, it now works perfectly! It’s amazing in the kernel how
many exceptions and special cases there are which need to be perfectly
handled. I’m glad to see there are knowledgeable people in here ![:slight_smile: :slight_smile:](/images/emoji/twitter/slight_smile.png?v=12)
Mat
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, May 27, 2004 6:10 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Dynamic Bus Driver
Furthermore, when you get a remove device on your PDO you to keep track
of whether you reported the PDO as missing to PNP. If you did report it
as missing, you delete the device object. If you did not report it as
missing, you keep the device object around and make that you can handle
getting a start irp or another remove device irp. You can get a remove
device by going into device manager and disabling (or uninstalling as
well) the child device. In essence, turn on the driver verifier and
test your code. The logic here is quite complex and you need to
absolutely get it right.
D
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, May 28, 2004 4:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Dynamic Bus Driver
You should invalidate your BusRelations and let PNP tell your driver
when it’s okay to delete the device.
You should not call IoDeleteDevice on a device you have reported to PNP
until you get a remove request.
You should not send PNP requests to your own stack in an effort to
destroy the device.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mathieu Routhier
Sent: Thursday, May 27, 2004 1:48 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Dynamic Bus Driver
Hi guys,
I have a conceptual question about bus drivers. Again.
I have this bus driver here, which builds a virtual bus and creates a
certain number of devices on it. I would like to be able to remove
those devices on the fly. What would be the correct way to remove those
PDOs?
Should I invalidate my BusRelations first?
Should I just call IoDeleteDevice on the device I want to remove?
Should I send IRP_REMOVE_DEVICE through the PDO device stack?
I have found the bus driver article that was in NT Insider some time
ago, but it doesn’t say a word about removing the devices.
Any reply appreciated! TIA
Mathieu Routhier
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@cvds.com
To unsubscribe send a blank email to xxxxx@lists.osr.com