- disable and re-enable a device
- Posted by Kenny Liew on August 8th, 2005
Hi,
I'm trying to disable a device by issuing an irp
(IRP_MN_QUERY_REMOVE_DEVICE) followed by another irp (IRP_MN_REMOVE_DEVICE).
to re-enable it again, I'm sending another irp(IRP_MN_START_DEVICE) but I'm
getting an error stating STATUS_DELETE_PENDING.
Hence, I managed to "disable" a device, but fail to "re-enable" it back.
Anybody know the right way of doing this?
I'm running as a filter driver.
Is there a way to force the system to re-enumerate all the devices - so I
could get the device back?
cheers.
- Posted by Maxim S. Shatskih on August 8th, 2005
You must not send these IRPs, only the PnP Manager can.
Your device can commit suicide by IoInvalidateDeviceState and then properly
responding to MN_QUERY_DEVICE_STATE.
Anyway enabling/disabling devices is more a user mode task.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Kenny Liew" <KennyLiew@discussions.microsoft.com> wrote in message
news:EB6D6614-5B50-4EC7-BEA6-8F7285EDBF75@microsoft.com...
- Posted by Arkady Frenkel on August 8th, 2005
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:%23WvcXLEnFHA.2472@TK2MSFTNGP15.phx.gbl...
DDK projects : Devcon or Enable show how to do that
Arkady