PNP_DEVICE_REMOVED problem

Hi,

I’m calling IoInvalidateDeviceState() for an attached device. After this routine in
IRP_MN_QUERY_PNP_DEVICE_STATE I set PNP_DEVICE_REMOVED flag. In this way I trigger IRP_MN_SURPRISE_REMOVAL and IRP_MN_REMOVE_DEVICE.
The device will become inaccessible but in device manager it appears with “!” sign.

How can I safe remove the device a from device manager?

Thank you very much.

Uhhhmmm… doesn’t the device have to be set “removable” during the initial PNP exchange… query capabilities or whatever it is?? Gad, I *used* to be able to remember such things off the top of my head!

Peter
OSR
@OSRDrivers

Requesting an eject is the only way to send a query remove => remove sequence from km. The problem is that while the eject processing succeeds, the underlying bus will still report the pdo as present and you will be restarted

d

Bent from my phone


From: xxxxx@osr.commailto:xxxxx
Sent: ?12/?19/?2014 6:09 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] PNP_DEVICE_REMOVED problem



Uhhhmmm… doesn’t the device have to be set “removable” during the initial PNP exchange… query capabilities or whatever it is?? Gad, I used to be able to remember such things off the top of my head!

Peter
OSR
@OSRDrivers


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx>

Hi,

Requesting an eject tells me that device is not supported such operation.

Thanks.

If a wdm driver, you failed mn_eject.

d

Bent from my phone


From: xxxxx@yahoo.commailto:xxxxx
Sent: ?1/?7/?2015 7:10 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] PNP_DEVICE_REMOVED problem

Hi,

Requesting an eject tells me that device is not supported such operation.

Thanks.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx>

Yes it’s a wdm driver.

Thank you for your quickly response.