// ntddk.h
NTSTATUS WheaRemoveErrorSourceDeviceDriver(
ULONG ErrorSourceId
);
View the official Windows Driver Kit DDI referenceNo description available.
To remove a previously added error source, a device driver calls WheaRemoveErrorSourceDeviceDriver.
ErrorSourceIdThe error source ID WHEA provided when it called the _WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER callback.
This function returns STATUS_SUCCESS or an error code.
STATUS_RESOURCE_IN_USE is returned if error handles are still in use.
This routine must be called at PASSIVE_LEVEL as it synchronously removes the device driver's error source.
For more info, see Using WHEA on Windows 10.
WheaAddErrorSourceDeviceDriver