Once not disableable, forever not disableable

One interesting quirk about the PNP_DEVICE_NOT_DISABLEABLE state is that once it has been set and the PnP manager has processed it, the state is sticky.  By sticky I mean that even if you attempt to clear this bit on a subsequent IRP_MN_QUERY_PNP_DEVICE_STATE IRP, the PnP manager ignores your changes to this state.  This state remains stuck until any of the following occur

  1. The machine is rebooted and the device is reenumerated
  2. The device (or any device in its ancestry) is surprise removed
  3. The device (or any device in its ancestry) is ejected
Comments (1)
  1. The issue was something I was aware of before Doron mentioned the word in Once not disableable, forever

Comments are closed.

Skip to main content