Hi,
I am writing an NDIS-WDM driver with USB being the lower WDM driver. The
driver registers the device as class “NET”. I wanted to know if a surpise
removal(Hot plug out) can be done on such a device. I know that we can
handle this in case of plain WDM USB drivers. In case of NDIS how do we
handle this. If i plug out the USB cable, i get the usual warning message
on the screen, telling it is not advisable to unplug the cable directly,
but to first stop the device and then remove the cable.
Can anyone please guide me with this.
TIA.
Sunil
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
There is no way to prevent a hot-plug NDIS/WDM device from having the arrow
icon in the system tray or from causing the warning pop-up on surprise
removal from within an NDIS driver on 2000/ME and earlier OSes. On XP you
can call NdisMSetAttributesEx and specify the
NDIS_ATTRIBUTE_SURPRISE_REMOVE_OK attribute flag and your device will not
have the arrow or the pop-up, in fact I am not sure the pop-up occurs on XP
anyway, but thats easy to test. For 2000/ME and earlier, the only way to
prevent this behavior is to create an upper filter driver for the NDIS
Miniport. The upper filter will need to pass everything through, except
the PnP IRP IRP_MN_QUERY_CAPABILITIES. For this IRP, the filter will need
to put in a completion routine and pass the IRP down. In the completion
routine modify the DEVICE_CAPABILTIES structure and set the
SurpriseRemovalOk bit to TRUE. This has to be done in the completion
routine as the PnP IRP is making its way up the device stack. Hope this
helps.
Bill M.
On 09/09/01, “xxxxx@smartyantraindia.com” wrote:
Hi,
I am writing an NDIS-WDM driver with USB being the lower WDM driver. The
driver registers the device as class “NET”. I wanted to know if a surpise
removal(Hot plug out) can be done on such a device. I know that we can
handle this in case of plain WDM USB drivers. In case of NDIS how do we
handle this. If i plug out the USB cable, i get the usual warning message
on the screen, telling it is not advisable to unplug the cable directly,
but to first stop the device and then remove the cable.
Can anyone please guide me with this.
TIA.
Sunil
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
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