I would start taking a step backwards from the situation and try to
isolate what is going on. For instance, do not have any app open the
device and then surprise remove the device. Does it then get a remove?
If not, start removing other variables from the equation.
One simple case to test is to write a simple KMDF driver that does
nothing at all and then surprise remove the device and see if it gets a
remove (you can tell if EvtObjectCleanup on the FDO WDFDEVICE is
called). If not, there is some other issue at hand, otherwise it is
something you are doing and you should continue down the elimination
path
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Roddy
Sent: Saturday, July 22, 2006 5:13 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] No IRP_MN_REMOVE_DEVICE after
IRP_MN_SURPRISE_REMOVAL
The device below is presumably also in pending remove state. In all
cases
I’ve seen where pending remove is stuck there is either an IRP that is
not
fully completed or a process that has an open handle to the device.
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@embeddedintelligence.com
Sent: Saturday, July 22, 2006 7:54 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] No IRP_MN_REMOVE_DEVICE after
IRP_MN_SURPRISE_REMOVAL
Hi Doron;
!devstack shows no device above mine in the stack, but there
is a device just below mine between my device and the pci
device. This is \Device\mrtcb which is the device for the
cardbus <-> PCI bridge that I’m using.
After I pop the PCI bridge out (and thereby get my surprise
removal), the !devstack just shows these two devices in the
stack. The lowest PCI device is gone.
!devhandles doesn’t seem to show any open handles, but I’m
having trouble finding any documentation on this command to
help me decypher it’s output.
Thanks,
Steve
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer