_WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER callback function

A driver's _WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER callback function initializes its error source hardware and software state.

Syntax

_WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER WheaErrorSourceInitializeDeviceDriver;

ULONG WheaErrorSourceInitializeDeviceDriver(
  PVOID Context,
  ULONG ErrorSourceId
)
{...}

Parameters

Context

ErrorSourceId

Return Value

This function method returns STATUS_SUCCESS or an appropriate error code.

Remarks

A driver should store the error source identifier it receives as input to this callback function for later communication with WHEA. For example, if the driver detects an error condition, it calls WheaReportHwErrorDeviceDriver, providing the error data and the driver's ErrorSourceId, to report the error to WHEA. When a driver is stopped (for example to be updated), it calls WheaRemoveErrorSourceDeviceDriver to unregister its error source identifier.

Register your implementation of this callback function by setting the appropriate member of WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER and then calling WheaAddErrorSourceDeviceDriver.

Requirements

   
Minimum supported client Windows 10, version 1903
Header ntddk.h

See Also

WHEA_ERROR_SOURCE_UNINITIALIZE_DEVICE_DRIVER