PSHED_PI_FINALIZE_ERROR_RECORD callback function (ntddk.h)
A PSHED plug-in's FinalizeErrorRecord callback function adds supplementary error record sections to an error record that more fully describe the error condition.
Syntax
PSHED_PI_FINALIZE_ERROR_RECORD PshedPiFinalizeErrorRecord;
NTSTATUS PshedPiFinalizeErrorRecord(
[in, out, optional] PVOID PluginContext,
[in] PWHEA_ERROR_SOURCE_DESCRIPTOR ErrorSource,
[in] ULONG BufferLength,
[in, out] PWHEA_ERROR_RECORD ErrorRecord
)
{...}
Parameters
[in, out, optional] PluginContext
A pointer to the context area that was specified in the Context member of the WHEA_PSHED_PLUGIN_REGISTRATION_PACKET structure when the PSHED plug-in called the PshedRegisterPlugin function to register itself with the PSHED.
[in] ErrorSource
A pointer to a WHEA_ERROR_SOURCE_DESCRIPTOR structure that describes the error source that reported the hardware error.
[in] BufferLength
The size, in bytes, of the buffer pointed to by the ErrorRecord parameter.
[in, out] ErrorRecord
A pointer to a WHEA_ERROR_RECORD structure that describes the error record that is being updated with supplementary error record sections.
Return value
A PSHED plug-in's FinalizeErrorRecord callback function returns one of the following NTSTATUS codes:
Return code | Description |
---|---|
STATUS_SUCCESS | The error record was successfully updated with any supplementary error record sections. |
STATUS_BUFFER_TOO_SMALL | The size of the buffer pointed to by the ErrorRecord parameter as specified by the BufferLength parameter is too small to contain the error record if it is updated with the supplementary error record sections. |
STATUS_NOT_SUPPORTED | The PSHED plug-in does not support the specified error source. |
STATUS_UNSUCCESSFUL | An error occurred. |
Remarks
A PSHED plug-in that participates in error information retrieval sets the Callbacks.RetrieveErrorInfo, Callbacks.FinalizeErrorRecord, and Callbacks.ClearErrorStatus members of the WHEA_PSHED_PLUGIN_REGISTRATION_PACKET structure to point to its RetrieveErrorInfo, FinalizeErrorRecord, and ClearErrorStatus callback functions when the plug-in calls the PshedRegisterPlugin function to register itself with the PSHED. The PSHED plug-in must also set the PshedFAErrorInfoRetrieval flag in the FunctionalAreaMask member of the WHEA_PSHED_PLUGIN_REGISTRATION_PACKET structure.
The Windows kernel calls into the PSHED so that it can add supplementary error record sections to an error record. If a PSHED plug-in is registered to participate in error information retrieval, the PSHED calls the PSHED plug-in's FinalizeErrorRecord callback function so that the PSHED plug-in can add any additional error record sections to the error record that more fully describe the error condition.
A PSHED plug-in must ensure that it does not add supplementary error record sections beyond the end of the error record. The amount of memory that the Windows kernel allocates for a buffer to contain a particular error record is calculated from the MaxRawDataLength and MaxSectionsPerRecord members of the WHEA_ERROR_SOURCE_DESCRIPTOR structure that describes the error source that reported the hardware error. If a PSHED plug-in requires additional buffer space to contain the supplementary error record sections that it adds to the error record, it must participate in error source discovery and increase the value in the MaxSectionsPerRecord member of the WHEA_ERROR_SOURCE_DESCRIPTOR structure for each error source as appropriate to account for any supplementary error record sections.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | ntddk.h (include Ntddk.h) |
IRQL | IRQL >= DISPATCH_LEVEL |