EVT_WDF_DEVICE_SURPRISE_REMOVAL - NtDoc

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

EVT_WDF_DEVICE_SURPRISE_REMOVAL EvtWdfDeviceSurpriseRemoval;

VOID EvtWdfDeviceSurpriseRemoval(
  [in] WDFDEVICE Device
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-wdfdevice-evt_wdf_device_surprise_removal)

EVT_WDF_DEVICE_SURPRISE_REMOVAL callback function

Description

[Applies to KMDF and UMDF]

A driver's EvtDeviceSurpriseRemoval event callback function performs any operations that are needed after a device has been unexpectedly removed from the system or after a driver reports that the device has failed.

Parameters

Device [in]

A handle to a framework device object.

Remarks

To register an EvtDeviceSurpriseRemoval callback function, a driver must call WdfDeviceInitSetPnpPowerEventCallbacks.

The framework does not synchronize the EvtDeviceSurpriseRemoval callback function with other PnP and power management callback functions. For information about how the framework synchronizes the execution of a driver's event callback functions, see Using Automatic Synchronization.

For more information about when the framework calls this callback function, and for more information about synchronization issues, see A User Unplugs a Device.