PSHED_PI_INJECT_ERROR callback function (ntddk.h)

A PSHED plug-in's InjectError callback function injects an error into the hardware platform.

Syntax

PSHED_PI_INJECT_ERROR PshedPiInjectError;

NTSTATUS PshedPiInjectError(
  [in, out, optional] PVOID PluginContext,
  [in]                ULONGLONG ErrorType,
  [in]                ULONGLONG Parameter1,
  [in]                ULONGLONG Parameter2,
  [in]                ULONGLONG Parameter3,
  [in]                ULONGLONG Parameter4
)
{...}

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] ErrorType

The type of error to be injected into the hardware platform. Possible values are:

INJECT_ERRTYPE_PROCESSOR_CORRECTABLE

A correctable processor error.

INJECT_ERRTYPE_PROCESSOR_UNCORRECTABLENONFATAL

An uncorrectable nonfatal processor error.

INJECT_ERRTYPE_PROCESSOR_UNCORRECTABLEFATAL

An uncorrectable fatal processor error.

INJECT_ERRTYPE_MEMORY_CORRECTABLE

A correctable memory error.

INJECT_ERRTYPE_MEMORY_UNCORRECTABLENONFATAL

An uncorrectable nonfatal memory error.

INJECT_ERRTYPE_MEMORY_UNCORRECTABLEFATAL

An uncorrectable fatal memory error.

INJECT_ERRTYPE_PCIEXPRESS_CORRECTABLE

A correctable PCI Express error.

INJECT_ERRTYPE_PCIEXPRESS_UNCORRECTABLENONFATAL

An uncorrectable nonfatal PCI Express error.

INJECT_ERRTYPE_PCIEXPRESS_UNCORRECTABLEFATAL

An uncorrectable fatal PCI Express error.

INJECT_ERRTYPE_PLATFORM_CORRECTABLE

A correctable platform error.

INJECT_ERRTYPE_PLATFORM_UNCORRECTABLENONFATAL

An uncorrectable nonfatal platform error.

INJECT_ERRTYPE_PLATFORM_UNCORRECTABLEFATAL

An uncorrectable fatal platform error.

[in] Parameter1

A generic parameter that contains additional data that is passed by the WHEA management application that is injecting the error.

[in] Parameter2

A generic parameter that contains additional data that is passed by the WHEA management application that is injecting the error.

[in] Parameter3

A generic parameter that contains additional data that is passed by the WHEA management application that is injecting the error.

[in] Parameter4

A generic parameter that contains additional data that is passed by the WHEA management application that is injecting the error.

Return value

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

Return code Description
STATUS_SUCCESS The error was successfully injected into the hardware platform.
STATUS_UNSUCCESSFUL An error occurred. For injected errors that are fatal or otherwise unrecoverable, this callback function might not return before the operating system generates a bug check in response to the error condition.

Remarks

A PSHED plug-in that participates in error injection sets the Callbacks.GetInjectionCapabilities and Callbacks.InjectError members of the WHEA_PSHED_PLUGIN_REGISTRATION_PACKET structure to point to its GetInjectionCapabilities and InjectError callback functions when the plug-in calls the PshedRegisterPlugin function to register itself with the PSHED. The PSHED plug-in must also set the PshedFAErrorInjection flag in the FunctionalAreaMask member of the WHEA_PSHED_PLUGIN_REGISTRATION_PACKET structure.

When a WHEA management application makes a request to inject a hardware error, the Windows kernel calls into the PSHED to inject the error into the hardware platform. If a PSHED plug-in is registered to participate in error injection, the PSHED calls the PSHED plug-in's InjectError callback function to perform the error injection operation.

The WHEA management application that is injecting the error can pass additional error-specific data to the PSHED plug-in's InjectError callback function by using parameters Parameter1 through Parameter4. For example, on Itanium-based systems, some of the error injection operations require an accompanying address. In this situation, the WHEA management application can pass the address to the PSHED plug-in's InjectError callback function using one of these parameters.

Requirements

Requirement Value
Minimum supported client Supported in Windows Server 2008, Windows Vista SP1, and later versions of Windows.
Target Platform Desktop
Header ntddk.h (include Ntddk.h)
IRQL IRQL = DISPATCH_LEVEL

See also

GetInjectionCapabilities

PshedRegisterPlugin

WHEA_PSHED_PLUGIN_REGISTRATION_PACKET