System trying to remove devices

Hi All
We are writing a PnP driver for W2K. The problem is that sometimes when we
create a new FDO, it gets IRP_MN_QUERY_REMOVE request. This request is not
initiated in any form by us or by the bus driver. Our driver replies with
STATUS_UNSUCCESSFUL, gets IRP_MN_CANCEL_REMOVE from the PnP Manager, and
then we see a dialog on the screen indicating that the system has to be
rebooted for the device to work properly. We do not reboot and then
everything works just fine.
Before the QUERY_REMOVE request the device gets QUERY_DEVICE_RELATIONS
request with RemovalRelations type. We tried to return STATUS_NOT_SUPPORTED
or STATUS_UNSUCCESSFUL for this request - no effect.
The question is why does the PnP Manager send the QUERY_REMOVE requests,
can we prevent it or can we prevent the dialog from showing up?
Any help is appreciated
Thanks
Gregory


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi All
We are writing a PnP driver for W2K. The problem is that sometimes when we
create a new FDO, it gets IRP_MN_QUERY_REMOVE request. This request is not
initiated in any form by us or by the bus driver. Our driver replies with
STATUS_UNSUCCESSFUL, gets IRP_MN_CANCEL_REMOVE from the PnP Manager, and
then we see a dialog on the screen indicating that the system has to be
rebooted for the device to work properly. We do not reboot and then
everything works just fine.
Before the QUERY_REMOVE request the device gets QUERY_DEVICE_RELATIONS
request with RemovalRelations type. We tried to return STATUS_NOT_SUPPORTED
or STATUS_UNSUCCESSFUL for this request - no effect.
The question is why does the PnP Manager send the QUERY_REMOVE requests, can
we prevent it or can we prevent the dialog from showing up?
Any help is appreciated
Thanks
Gregory


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

PnP manager sends IRP_MN_QUERY_REMOVE when someone asks to reenumerate your
devices. You should support this request. Just after removing the PnP
manager will call AddDevice routine.
For example fastfat.sys invalidates hard drives when they are connected to
the system the first time. PnP sends query remove, then remove for disk
device object, just after that AddDevice routine is called with the same
PDO, that was before removing.

Regards,
Max

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gregory Dardyk
Sent: Tuesday, September 04, 2001 5:57 PM
To: NT Developers Interest List
Subject: [ntdev] System trying to remove devices

Hi All
We are writing a PnP driver for W2K. The problem is that sometimes when we
create a new FDO, it gets IRP_MN_QUERY_REMOVE request. This request is not
initiated in any form by us or by the bus driver. Our driver replies with
STATUS_UNSUCCESSFUL, gets IRP_MN_CANCEL_REMOVE from the PnP Manager, and
then we see a dialog on the screen indicating that the system has to be
rebooted for the device to work properly. We do not reboot and then
everything works just fine.
Before the QUERY_REMOVE request the device gets QUERY_DEVICE_RELATIONS
request with RemovalRelations type. We tried to return STATUS_NOT_SUPPORTED
or STATUS_UNSUCCESSFUL for this request - no effect.
The question is why does the PnP Manager send the QUERY_REMOVE requests, can
we prevent it or can we prevent the dialog from showing up?
Any help is appreciated
Thanks
Gregory


You are currently subscribed to ntdev as: xxxxx@acronis.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com