Hello,

I am writing a NDIS-WDM (USB ) driver for NDIS5.1 (XP). I used the
sample from Eliyas.

I saw the mailing lists and set the NDIS_ATTRIBUTE_SURPRISE_REMOVAL_OK
bit in the call to NdisMSetAttributesEx from MiniportInitialize
function. And I implemented the additional MiniportPnPEventNotify
function also.

When I plug-in the cable, Windows loads my driver. But the "System Tray"
icon for "Safely Remove Hardware" appears. When I remove the cable, I
get a call to my PnPEventNotify function with SurpriseRemoved event set.
There is no pop-up error message as per XP standards.

But, I was under the understanding that if the SURPRISE_REMOVAL_OK bit
is set, even the "tray icon" does not appear.

Please help me in making sure that my understanding is right. If I am
wrong, what have I done wrong in the driver that this is not working?

Any pointers or any kind of help is greatly appreciated.

Thanks in advance for the great help.

Best Regards,

GNRaj

Re: Help required on Surprise Removal in XP (NDIS5.1) when writing NDIS-WDM drivers by Maxim

Maxim
Sat Dec 13 03:07:28 CST 2003

> icon for "Safely Remove Hardware" appears. When I remove the cable, I
> get a call to my PnPEventNotify function with SurpriseRemoved event set.

Cable removal is not device removal. You must indicate the media disconnect
instead.

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



Re: Help required on Surprise Removal in XP (NDIS5.1) when writing NDIS-WDM drivers by Pavel

Pavel
Sun Dec 14 06:46:25 CST 2003

"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message news:eylHWgVwDHA.2072@TK2MSFTNGP10.phx.gbl...
> Cable removal is not device removal.

Unless this is _the_ USB cable :)



Re: Help required on Surprise Removal in XP (NDIS5.1) when writing NDIS-WDM drivers by Maxim

Maxim
Sun Dec 14 12:11:35 CST 2003

> > Cable removal is not device removal.
>
> Unless this is _the_ USB cable :)

Yes, I was about _Ethernet_ cable :-)

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



Re: Help required on Surprise Removal in XP (NDIS5.1) when writing by GNRaj

GNRaj
Sun Dec 14 22:23:22 CST 2003

I am talking about a USB Device. Sorry if I was not clear about this.

Since it is a USB Cable, there is no cable disconnect event possible as
the driver gets a halt call.

I am talking about the "Safely Remove Hardware" ICON in the SYSTEM TRAY.
This is supposed to have gone once the NDIS Attribute for
SURPRISE_REMOVAL is set by the driver. But this is not the case here.

Please help me in getting the solution for this problem.

Any pointers or any kind of help is great.

Thanks in advance

Best Regards,

GNRaj


Maxim S. Shatskih wrote:
>>>Cable removal is not device removal.
>>
>>Unless this is _the_ USB cable :)
>
>
> Yes, I was about _Ethernet_ cable :-)
>


Re: Help required on Surprise Removal in XP (NDIS5.1) when writing by GNRaj

GNRaj
Tue Dec 16 21:24:52 CST 2003

I don't know why no one is replying.

Does this mean no one has faced any problem of this sort?

Eliyas, Are you there? Can you please help me?

Thanks in advance

Best Regards,

GNRaj

GNRaj wrote:
> I am talking about a USB Device. Sorry if I was not clear about this.
>
> Since it is a USB Cable, there is no cable disconnect event possible as
> the driver gets a halt call.
>
> I am talking about the "Safely Remove Hardware" ICON in the SYSTEM TRAY.
> This is supposed to have gone once the NDIS Attribute for
> SURPRISE_REMOVAL is set by the driver. But this is not the case here.
>
> Please help me in getting the solution for this problem.
>
> Any pointers or any kind of help is great.
>
> Thanks in advance
>
> Best Regards,
>
> GNRaj
>
>
> Maxim S. Shatskih wrote:
>
>>>> Cable removal is not device removal.
>>>
>>>
>>> Unless this is _the_ USB cable :)
>>
>>
>>
>> Yes, I was about _Ethernet_ cable :-)
>>
>