DEVICE_REMOVAL_POLICY - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

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

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ne-wdm-_device_removal_policy)

_DEVICE_REMOVAL_POLICY enumeration

Description

The DEVICE_REMOVAL_POLICY enumeration describes a device's 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.

See also

IRP_MN_QUERY_REMOVE_DEVICE

IRP_MN_SURPRISE_REMOVAL

IoGetDeviceProperty