Re: What's the secmantics of IoDetachDevice?



C's driver will have its FastIoDetachDevice callback called (if it exists),
and should detach and destroy C in this callback.

For WDM PnP stacks, this is not interesting - the MN_REMOVE_DEVICE path
should detach and destroy the device objects from bottom to top, nobody will
destroy in the middle.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com

"xmllmx" <xmllmx@xxxxxxxxx> wrote in message
news:1186734780.536393.196570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The DDK documentation on IoDetachDevice is terribly concise.

Suppose I have a filter A wanting to attach to device object B, and I
attached A to B successfully. Later, another filter C attach itself to
A, so C->A->B make up a device stack. If filter A calls
IoDetachDevice(pDeviceB); then A is sure to be removed from the stack.
However, the question is: Is C still on the top of the stack? (i.e C-
B?)


.



Relevant Pages

  • Re: current panics when Netgear WG511T ejected
    ... just one dhcp-assigned unicast addr. ... Even if you have no multicast addresses explicitly configured by yourself or any application, the multicast code is always used on any system configured with INET. ... Because the hardware is being ejected, the netinet part of the stack won't see the detach first, but net will, and this is where the panic is happening. ...
    (freebsd-current)
  • -V- Display floor stacks in a list option not working with pickup?
    ... patched to destroy wands/staves on ... It seems to me like the "Display floor stacks in a list" option has no ... only pick up the top item in the stack, the way most of the other ... spell books, potions of healing, etc. if you're already carrying them. ...
    (rec.games.roguelike.angband)
  • Re: Serial Upper Filter Driver Help Required
    ... You need to shutdown the stack to detach the driver. ... Maxim Shatskih, Windows DDK MVP ...
    (microsoft.public.development.device.drivers)
  • Re: stack display
    ... >>I want to display a stack but keep the elements in the stack as they were. ... > contains a protected member 'Container c', where Container is the type of ... > Bart v Ingen Schenau ... destroy the copy, leaving the original untouched. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Serial Upper Filter Driver Help Required
    ... You need to shutdown the stack to detach the driver. ... What does IoDetachDevice do then? ...
    (microsoft.public.development.device.drivers)