IRP_MN_EJECT

Bus drivers typically handle this request for their child devices (child PDOs) that support device ejection. Function and filter drivers do not receive this request.

Value

0x11

Major Code

IRP_MJ_PNP

When Sent

The PnP manager sends this IRP to direct the appropriate driver or drivers to eject the device from its slot.

The PnP manager sends this IRP at IRQL PASSIVE_LEVEL in an arbitrary thread context.

Input Parameters

None

Output Parameters

None

I/O Status Block

A bus driver sets Irp->IoStatus.Status to STATUS_SUCCESS or to an appropriate error status.

On success, a bus driver sets Irp->IoStatus.Information to zero.

If a bus driver does not handle this IRP, it leaves Irp->IoStatus.Status as is and completes the IRP.

Operation

For the device to be ejected, the device must be in the D3 device power state (off) and must be unlocked (if the device supports locking).

Any driver that returns success for this IRP must wait until the device has been ejected before completing the IRP.

See Plug and Play for the general rules for handling Plug and Play minor IRPs.

Sending This IRP

Reserved for system use. Drivers must not send this IRP.

Instead, see the reference page for the IoRequestDeviceEject routine.

Requirements

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

See also

IoRequestDeviceEject