PSHED_PI_WRITE_ERROR_RECORD - NtDoc

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

PSHED_PI_WRITE_ERROR_RECORD PshedPiWriteErrorRecord;

NTSTATUS PshedPiWriteErrorRecord(
  [in, out, optional] PVOID PluginContext,
  [in]                ULONG Flags,
  [in]                ULONG RecordLength,
  [in]                PWHEA_ERROR_RECORD ErrorRecord
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-ntddk-pshed_pi_write_error_record)

Description

A PSHED plug-in's WriteErrorRecord callback function writes an error record to the system's persistent data storage.

Parameters

PluginContext [in, out, optional]

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.

Flags [in]

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.

RecordLength [in]

The size, in bytes, of the error record pointed to by the ErrorRecord parameter.

ErrorRecord [in]

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.

See also

ClearErrorRecord

PshedRegisterPlugin

ReadErrorRecord

WHEA_ERROR_RECORD

WHEA_PSHED_PLUGIN_REGISTRATION_PACKET