PSHED_PI_CLEAR_ERROR_RECORD - NtDoc

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

PSHED_PI_CLEAR_ERROR_RECORD PshedPiClearErrorRecord;

NTSTATUS PshedPiClearErrorRecord(
  [in, out, optional] PVOID PluginContext,
  [in]                ULONG Flags,
  [in]                ULONGLONG ErrorRecordId
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

Description

A PSHED plug-in's ClearErrorRecord callback function clears the specified error record from 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 clear operation. No flags are currently defined.

ErrorRecordId [in]

The identifier of the error record that is being cleared from the system's persistent data storage. This identifier should be compared to the Header.RecordId member of each WHEA_ERROR_RECORD structure that has been written to the system's persistent data storage to identify the error record to be cleared.

Return value

A PSHED plug-in's ClearErrorRecord callback function returns one of the following NTSTATUS codes:

Return code Description
STATUS_SUCCESS The error record was successfully cleared from 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 clear an error record from the system's persistent data storage. If a PSHED plug-in is registered to participate in error record persistence, the PSHED calls the PSHED plug-in's ClearErrorRecord callback function to perform the clear operation. The mechanism that is used to clear the error record from the system's persistent data storage is platform-specific.

See also

PshedRegisterPlugin

ReadErrorRecord

WHEA_ERROR_RECORD

WHEA_PSHED_PLUGIN_REGISTRATION_PACKET

WriteErrorRecord