WheaAddErrorSourceDeviceDriver - NtDoc

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

NTSTATUS WheaAddErrorSourceDeviceDriver(
  PVOID                                          Context,
  PWHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER Configuration,
  ULONG                                          NumberPreallocatedErrorReports
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntddk-wheaadderrorsourcedevicedriver)

WheaAddErrorSourceDeviceDriver function

Description

A device driver calls WheaAddErrorSourceDeviceDriver to add an error source.

Parameters

Context

An optional pointer to a caller-allocated context. WHEA provides the context as a parameter to driver-supplied callback routines. Can be NULL.

Configuration

Pointer to a structure of type WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER that contains a set of driver-supplied callback routines.

NumberPreallocatedErrorReports

A value of type ULONG that specifies the number of records to preallocate. See Remarks for more information.

Return value

This function method returns STATUS_SUCCESS if the error source is added. Otherwise it can return one of the following:

Remarks

To remove an error source, the driver calls WheaRemoveErrorSourceDeviceDriver.

WHEA can preallocate memory for errors that will be reported at high IRQL (i.e. in the context of a device interrupt). For error sources reported at PASSIVE_LEVEL, preallocation is not required but if the device driver reports errors for its error source at DISPATCH_LEVEL or higher, error records must be preallocated.

For more info, see Using WHEA on Windows 10.

See also

WheaRemoveErrorSourceDeviceDriver

WheaReportHwErrorDeviceDriver

WheaCreateHwErrorReportDeviceDriver