PshedRegisterPlugin function (ntddk.h)

The PshedRegisterPlugin function registers a PSHED plug-in with the PSHED.

Syntax

NTPSHEDAPI NTSTATUS PshedRegisterPlugin(
  PWHEA_PSHED_PLUGIN_REGISTRATION_PACKET Packet
);

Parameters

Packet

[in, out] A pointer to an initialized WHEA_PSHED_PLUGIN_REGISTRATION_PACKET structure that describes the PSHED plug-in's registration information.

Return value

PshedRegisterPlugin returns one of the following NTSTATUS codes:

Return code Description
STATUS_SUCCESS
The PSHED plug-in was successfully registered.
STATUS_INVALID_PARAMETER
The data in the supplied registration packet is invalid.

Remarks

A PSHED plug-in calls the PshedRegisterPlugin function to register itself with the PSHED. A PSHED plug-in typically calls this function from within either its DriverEntry function or its AddDevice function.

Starting in Windows 10, version 1903 (WDK 10 version 18362), a V2 of the PSHED-Plugin interfaces is available that allows a plugin to be removed and updated on a running system by calling the PshedUnregisterPlugin function. Due to being allowed to unregister, V2 plugins cannot specify the PshedFADiscovery flag (discovery functional area) in the FunctionalAreaMask member of the WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2 structure. For info about registering a plug-in, see Registering a PSHED Plug-In.

A V2 plugin can still add error sources as described in Using WHEA on Windows 10, or by calling WheaAddErrorSource and WheaRemoveErrorSource.

A plugin may continue to use the discovery functional area by specifying WHEA_PLUGIN_REGISTRATION_PACKET_V1 as the version of its WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2 structure.

Requirements

   
Minimum supported client Supported in Windows Server 2008, Windows Vista SP1, and later versions of Windows.
Target Platform Universal
Header ntddk.h (include Ntddk.h)
Library Pshed.lib
DLL Pshed.dll
IRQL <=DISPATCH_LEVEL

See also

AddDevice

DriverEntry

WHEA_PSHED_PLUGIN_REGISTRATION_PACKET