Wait for child devices to be destroyed

Once the parent device decides to go down, I report all it’s children are missing.
After reporting child devices are missing, I want the parent device before initiating it’s clean up (for ex: I want to stop all threads etc., ) to wait for all children to go away (till EvtDestroy get called for each child device). Any suggestions?

It’s a WDF driver.

The parent device won’t get removed until the children have all been removed already. PNP ensures this for you. What is it you need beyond that?

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Thursday, April 16, 2009 9:09 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Wait for child devices to be destroyed

Once the parent device decides to go down, I report all it’s children are missing.
After reporting child devices are missing, I want the parent device before initiating it’s clean up (for ex: I want to stop all threads etc., ) to wait for all children to go away (till EvtDestroy get called for each child device). Any suggestions?

It’s a WDF driver.


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

In terms of callbacks, EvtObjectCleanup() will be called on all child WDFDEVICEs before EvtObjectCleanup() will be called on the parent WDFDEVICE. EvtObjectDestroy() is called when the ref count goes to zero and are independent of the parent/child relationship, so if you have dangling refs that you release later, the EvtObjectDestroy() for the children can come after the parent.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Thursday, April 16, 2009 12:06 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Wait for child devices to be destroyed

The parent device won’t get removed until the children have all been removed already. PNP ensures this for you. What is it you need beyond that?

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Thursday, April 16, 2009 9:09 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Wait for child devices to be destroyed

Once the parent device decides to go down, I report all it’s children are missing.
After reporting child devices are missing, I want the parent device before initiating it’s clean up (for ex: I want to stop all threads etc., ) to wait for all children to go away (till EvtDestroy get called for each child device). Any suggestions?

It’s a WDF driver.


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


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