// ntddk.h
NTSTATUS WheaReportHwErrorDeviceDriver(
ULONG ErrorSourceId,
PDEVICE_OBJECT DeviceObject,
PUCHAR ErrorData,
ULONG ErrorDataLength,
LPGUID SectionTypeGuid,
WHEA_ERROR_SEVERITY ErrorSeverity,
LPSTR DeviceFriendlyName
);
View the official Windows Driver Kit DDI referenceNo description available.
To report a hardware error, the driver calls the WheaReportHwErrorDeviceDriver function.
ErrorSourceIdThe error source ID WHEA provided when it called the _WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER callback.
DeviceObjectA pointer to the device object associated with the error condition.
ErrorDataThe buffer containing the driver's hardware error data. This information is hardware-specific, and must not exceed the MaxRawDataLength that the driver provided to WheaAddErrorSourceDeviceDriver .
ErrorDataLengthA value of type ULONG specifying the size, in bytes, of the error data.
SectionTypeGuidSpecifies what type of error data is being reported. This may be, but is not required to be, one of the GUIDs defined in the Appendix N of the UEFI Specification, in which case the error information matches one of the specified section types. The caller can also create a GUID and private section format.
ErrorSeverityAn enumeration value of type WHEA_ERROR_SEVERITY specifying the severity of the error condition.
DeviceFriendlyNameAn optional string up to 20 bytes in length (including NULL terminator) that describes the device associated with the error condition. This information is copied into the resulting WHEA error record and is informational only. The intent is to place this information in the error record so when event logs are created a consumer can easily troubleshoot device problems.
This function method returns STATUS_SUCCESS or an appropriate error code.
WheaAddErrorSourceDeviceDriver
WheaRemoveErrorSourceDeviceDriver