DEVICE_REMOVAL_POLICY enumeration

The DEVICE_REMOVAL_POLICY enumeration describes a device's removal policy.

Syntax


typedef enum _DEVICE_REMOVAL_POLICY { 
  RemovalPolicyExpectNoRemoval        = 1,
  RemovalPolicyExpectOrderlyRemoval   = 2,
  RemovalPolicyExpectSurpriseRemoval  = 3
} 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

Header

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

See also

IoGetDeviceProperty
IRP_MN_QUERY_REMOVE_DEVICE
IRP_MN_SURPRISE_REMOVAL

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft