// wdm.h
typedef enum _DEVICE_REMOVAL_POLICY {
RemovalPolicyExpectNoRemoval,
RemovalPolicyExpectOrderlyRemoval,
RemovalPolicyExpectSurpriseRemoval
} DEVICE_REMOVAL_POLICY, *PDEVICE_REMOVAL_POLICY;
View the official Windows Driver Kit DDI referenceNo description available.
The DEVICE_REMOVAL_POLICY enumeration describes a device's removal policy.
RemovalPolicyExpectNoRemovalThe device is not typically removed.
RemovalPolicyExpectOrderlyRemovalThe 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.)
RemovalPolicyExpectSurpriseRemovalThe 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.)
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.