What does HRESULT 0x800F021C (SPAPI_E_DEVICE_INTERFACE_REMOVED) mean?

 
Previous Next
SPAPI_E_DEVICE_INTERFACE_ACTIVE SPAPI_E_BAD_INTERFACE_INSTALLSECT

SPAPI_E_DEVICE_INTERFACE_REMOVED

The enumeration record outlived the registered interface

SPAPI_E_DEVICE_INTERFACE_REMOVED indicates that the SP_DEVICE_INTERFACE_DATA element no longer refers to a usable registered interface. A removal, surprise-removal path, rescan, or concurrent installer can invalidate an element retained from an earlier device information set.

The status is not corrected by clearing the removed flag in memory. SetupAPI owns the interface state, and device paths are not durable identifiers. The application should discard stale data, rebuild the device information set, and decide whether a replacement interface represents the same physical or logical function.

Recover by re-enumerating authoritative state

  • Check the SPINT_REMOVED flag before performing follow-up operations.
  • Destroy and recreate stale device information sets after topology changes.
  • Use device-instance and interface-class properties to correlate a newly enumerated replacement.
  • Handle removal notifications so worker threads stop using paths and interface structures promptly.

References


Looking for a different code? Search another status or error code.