Help required on Surprise Removal in XP (NDIS5.1) when writing NDIS-WDMdrivers

Discussion in 'Windows Vista Drivers' started by GNRaj, Dec 10, 2003.

  1. GNRaj

    GNRaj Guest

    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
     
    GNRaj, Dec 10, 2003
    #1
    1. Advertisements

  2. icon for "Safely Remove Hardware" appears. When I remove the cable, I
    Cable removal is not device removal. You must indicate the media disconnect
    instead.
     
    Maxim S. Shatskih, Dec 13, 2003
    #2
    1. Advertisements

  3. GNRaj

    Pavel A. Guest

    Unless this is _the_ USB cable :)
     
    Pavel A., Dec 14, 2003
    #3
  4. Cable removal is not device removal.
    Yes, I was about _Ethernet_ cable :)
     
    Maxim S. Shatskih, Dec 14, 2003
    #4
  5. GNRaj

    GNRaj Guest

    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
     
    GNRaj, Dec 15, 2003
    #5
  6. GNRaj

    GNRaj Guest

    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, Dec 17, 2003
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.