DEVICE_REMOVAL_POLICY enumeration (wdm.h)

The DEVICE_REMOVAL_POLICY enumeration describes a device's removal policy.

Syntax

typedef enum _DEVICE_REMOVAL_POLICY {
  RemovalPolicyExpectNoRemoval,
  RemovalPolicyExpectOrderlyRemoval,
  RemovalPolicyExpectSurpriseRemoval
} DEVICE_REMOVAL_POLICY, *PDEVICE_REMOVAL_POLICY;

Constants

 
RemovalPolicyExpectNoRemoval
The device is not typically removed.
RemovalPolicyExpectOrderlyRemoval
The device is typically removed in an orderly fashion. (Before the device is removed, the Plug and Play [PnP] manager sends an IRP_MN_QUERY_REMOVE_DEVICE request to the device's driver.)
RemovalPolicyExpectSurpriseRemoval
The device can be removed suddenly. (The driver receives no advance warning that the device will be removed. The Plug and Play [PnP] manager sends an IRP_MN_SURPRISE_REMOVAL request when the device is removed.)

Remarks

The IoGetDeviceProperty routine supplies a DEVICE_REMOVAL_POLICY enumeration value when a driver requests DevicePropertyRemovalPolicy. The operating system uses the value as a hint as to how the device is typically removed from the computer.

Requirements

Requirement Value
Header wdm.h (include Wdm.h, Ntddk.h)

See also

IRP_MN_QUERY_REMOVE_DEVICE

IRP_MN_SURPRISE_REMOVAL

IoGetDeviceProperty