Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Eject and Unplug

OSR_Community_UserOSR_Community_User Member Posts: 110,217

Could somebody please explain the difference between Eject and Unplug ?



  • OSR_Community_User-35OSR_Community_User-35 Member Posts: 154
    Different bits turned on in the DEVICE_CAPABILITIES struct returned in
    response to IRP_MN_QUERY_CAPABILITIES :)

    If a PDO sets the EjectSupported bit, then it may receive an IRP_MN_EJECT
    IRP after the last IRP_MN_REMOVE IRP. The device is expected to
    physically remove itself from its enclosure, whereas Removable simply
    means the user can unplug it while the host machine is online,
    preferably after a controlled remove process (IRP_MN_REMOVE).

    If a device is merely Removable, one can nonetheless call
    CM_Request_Device_Eject() from user-mode to initiate removal. It
    just won't get an eject IRP at the end.

    Dave Cox
    Hewlett-Packard Co.
    HPSO/SSMO (Santa Barbara)

    -----Original Message-----
    From: [email protected] [mailto:[email protected]]
    Sent: Thursday, May 25, 2000 12:45 PM
    To: NT Developers Interest List
    Subject: [ntdev] Eject and Unplug


    Could somebody please explain the difference between Eject and Unplug ?


    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    From: <[email protected]>
    Sent: Thursday, May 25, 2000 7:44 PM

    > Hello,
    > Could somebody please explain the difference between Eject and Unplug ?

    "Unplugging" implies that the *user* physically disconnects a device
    attached to the computer. This can occur in a controlled (computer asked to
    "allow" the unplugging first) or uncontrolled (computer not asked) manner.
    Imagine a user frantically yanking out the cord for their USB camera because
    Elvis just walked by their cubicle (this would be an example of the
    uncontrolled case).

    "Ejecting" means that the *computer* releases something that has been
    inserted into it or it inserted into (media, port replicator, etc.) usually
    only in an automatic, controlled manner. For example, imagine a motorized
    CD-ROM drawer opening or PC Card popping out after the user has somehow
    issued the appropriate "eject" command.

    - Matt
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 26 Feb - 1 Mar 2024 Live, Online