PSHED_PI_WRITE_ERROR_RECORD callback function (ntddk.h)
A PSHED plug-in's WriteErrorRecord callback function writes an error record to the system's persistent data storage.
Syntax
PSHED_PI_WRITE_ERROR_RECORD PshedPiWriteErrorRecord;
NTSTATUS PshedPiWriteErrorRecord(
[in, out, optional] PVOID PluginContext,
[in] ULONG Flags,
[in] ULONG RecordLength,
[in] 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] Flags
A bit-wise OR'ed combination of flags that affect the write operation. A possible flag is:
WHEA_WRITE_FLAG_DUMMY
The write operation is a dummy write operation. No data is to be written to the system's persistent data storage.
[in] RecordLength
The size, in bytes, of the error record pointed to by the ErrorRecord parameter.
[in] ErrorRecord
A pointer to a WHEA_ERROR_RECORD structure that describes the error record that is being written to the system's persistent data storage.
Return value
A PSHED plug-in's WriteErrorRecord callback function returns one of the following NTSTATUS codes:
Return code | Description |
---|---|
STATUS_SUCCESS | The error record was successfully written to the system's persistent data storage. |
STATUS_UNSUCCESSFUL | An error occurred. |
Remarks
A PSHED plug-in that participates in error record persistence sets the Callbacks.WriteErrorRecord, Callbacks.ReadErrorRecord and Callbacks.ClearErrorRecord members of the WHEA_PSHED_PLUGIN_REGISTRATION_PACKET structure to point to its WriteErrorRecord, ReadErrorRecord, and ClearErrorRecord callback functions when the plug-in calls the PshedRegisterPlugin function to register itself with the PSHED. The PSHED plug-in must also set the PshedFAErrorRecordPersistence flag in the FunctionalAreaMask member of the WHEA_PSHED_PLUGIN_REGISTRATION_PACKET structure.
The Windows kernel calls into the PSHED to write an error record to the system's persistent data storage whenever a fatal or otherwise unrecoverable error condition exists so that the error record is preserved while the system is restarted. If a PSHED plug-in is registered to participate in error record persistence, the PSHED calls the PSHED plug-in's WriteErrorRecord callback function to perform the write operation. The mechanism that is used to write the error record to the system's persistent data storage is platform-specific.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | ntddk.h (include Ntddk.h) |
IRQL | IRQL >= DISPATCH_LEVEL |