WheaFindErrorRecordSection function (ntddk.h)

The WheaFindErrorRecordSection function searches for a specified Windows Hardware Error Architecture (WHEA) error record section within a WHEA error record. The error record section is formatted as a WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure.

Syntax

NTSTATUS WheaFindErrorRecordSection(
  [in]            PWHEA_ERROR_RECORD                    Record,
  [in]            const GUID                            *SectionType,
  [out]           PWHEA_ERROR_RECORD_SECTION_DESCRIPTOR *SectionDescriptor,
  [out, optional] PVOID                                 *SectionData
);

Parameters

[in] Record

A pointer to a WHEA error record that is formatted as a WHEA_ERROR_RECORD structure.

[in] SectionType

A GUID that specifies the WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure to be located within the specified WHEA error record.

[out] SectionDescriptor

The address of a WHEA_ERROR_RECORD_SECTION_DESCRIPTOR pointer.

If the WheaFindErrorRecordSection function locates the specified WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure, the function sets the SectionDescriptor parameter to the address of that structure within the specified WHEA error record.

[out, optional] SectionData

The address of a PVOID pointer.

If the WheaFindErrorRecordSection function locates the specified WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure, the function sets the SectionData parameter to the address of the hardware error data associated with that descriptor within the specified WHEA error record.

This parameter is optional and must be set to NULL if a pointer to the hardware error data is not required.

Return value

WheaFindErrorRecordSection returns one of the following NTSTATUS codes:

Return code Description
STATUS_SUCCESS The specified WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure was found.
STATUS_NOT_FOUND The specified WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure was not found.
STATUS_INVALID_PARAMETER Either the Record, SectionType, or SectionDescriptor parameters were set to NULL, or the WHEA error record referenced through the Record parameter is invalid.

Remarks

If WheaFindErrorRecordSection returns STATUS_SUCCESS, it has located the WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure that was specified through the Guid parameter. WheaFindErrorRecordSection sets the SectionDescriptor parameter to the address of the located WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure.

Additionally, if WheaFindErrorRecordSection returns STATUS_SUCCESS and the caller set the SectionData parameter to the address of a PVOID pointer variable, the function updates the parameter with the address of the hardware error data associated with the specified WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure.

The format of the hardware error data is dependent upon the SectionType member of the WHEA_ERROR_RECORD_SECTION_DESCRIPTOR structure referenced through the SectionDescriptor parameter. For example, if the SectionType member has the value PROCESSOR_GENERIC_ERROR_SECTION_GUID, the hardware error data is formatted as a WHEA_PROCESSOR_GENERIC_ERROR_SECTION structure.

Requirements

Requirement Value
Minimum supported client Supported in Windows 7 and later versions of Windows.
Target Platform Desktop
Header ntddk.h (include Ntddk.h)
IRQL IRQL <=DISPATCH_LEVEL

See also

Error record

WHEA_ERROR_RECORD

WHEA_ERROR_RECORD_SECTION_DESCRIPTOR