title | description | keywords | topic_type | api_name | api_location | api_type | ms.date | ms.topic | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DEVPKEY_Device_SafeRemovalRequiredOverride |
The DEVPKEY_Device_SafeRemovalRequiredOverride device property represents the safe removal override for the device instance. |
|
|
|
|
|
09/19/2022 |
reference |
The DEVPKEY_Device_SafeRemovalRequiredOverride device property represents the safe removal override for the device instance.
Attribute | Value |
---|---|
Property key | DEVPKEY_Device_SafeRemovalRequiredOverride |
Property-data-type identifier | DEVPROP_TYPE_BOOLEAN |
Property access | Read and write access by installation applications and installers |
Localized? | No |
This device property can be used to override the result of the heuristic that Windows Plug and Play (PnP) uses to calculate the value of the DEVPKEY_Device_SafeRemovalRequired device property. This override is performed as follows:
-
If the DEVPKEY_Device_SafeRemovalRequiredOverride device property is set to DEVPROP_TRUE and the device instance is removable or has a removable ancestor, PnP sets the DEVPKEY_Device_SafeRemovalRequired device property to DEVPROP_TRUE and does not use the heuristic.
[!NOTE] A device instance is considered removable if its removable device capability is set. For more information, see Overview of the Removable Device Capability.
-
If the DEVPKEY_Device_SafeRemovalRequiredOverride device property is set to DEVPROP_TRUE and the device instance (or an ancestor) is not removable, PnP sets the DEVPKEY_Device_SafeRemovalRequired to DEVPROP_FALSE and does not use the heuristic.
-
If the DEVPKEY_Device_SafeRemovalRequiredOverride device property is either not set or set to DEVPROP_FALSE, PnP sets the DEVPKEY_Device_SafeRemovalRequired device property to a value that is determined by using the heuristic.
You can retrieve the value of DEVPKEY_Device_SafeRemovalRequiredOverride by calling CM_Get_DevNode_Property or SetupDiGetDeviceProperty. You can also set this value by calling CM_Set_DevNode_Property or SetupDiSetDeviceProperty.
Version: Windows 7 and later versions of Windows
Header: Devpkey.h (include Devpkey.h)