PoFxRegisterPluginEx function (pepfx.h)

The PoFxRegisterPluginEx routine registers a platform extension plug-in (PEP) with the Windows power management framework (PoFx).

Syntax

NTSTATUS PoFxRegisterPluginEx(
  [in]      PPEP_INFORMATION        PepInformation,
  [in]      ULONGLONG               Flags,
  [in, out] PPEP_KERNEL_INFORMATION KernelInformation
);

Parameters

[in] PepInformation

A pointer to a PEP_INFORMATION structure that contains pointers to one or more callback routines that are implemented by the PEP. These routines handle notifications that are sent to the PEP by PoFx.

[in] Flags

A set of flag bits for configuring the PEP interface. Set this member to zero or to the following value.

Flag bit Description
PEP_FLAG_WORKER_CONCURRENCY

[in, out] KernelInformation

A pointer to a PEP_KERNEL_INFORMATION structure.

Return value

PoFxRegisterPluginEx returns STATUS_SUCCESS if the call successfully registers the PEP. Possible error return values include the following status codes.

Return value Description
STATUS_INVALID_PARAMETER
The Version or Size member of the PEP_KERNEL_INFORMATION structure is set to an invalid value; or the AcceptDeviceNotification member of this structure is set to NULL.
STATUS_INVALID_PEP_INFO_VERSION
The Version member of the PEP_INFORMATION structure is set to an invalid value.
STATUS_INSUFFICIENT_RESOURCES
Unable to allocate the resources required to complete the requested registration.

Remarks

A PEP calls this routine to register itself with PoFx.

A PEP cannot unregister, and cannot register twice. If the PEP must be serviced, the operating system must restart.

The PoFxRegisterPlugin routine is similar to PoFxRegisterPluginEx, except that it does not take a Flags parameter.

The PEP must call PoFxRegisterPluginEx at IRQL = PASSIVE_LEVEL.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 10.
Target Platform Windows
Header pepfx.h (include Pep_x.h)
Library Ntoskrnl.lib
IRQL PASSIVE_LEVEL

See also

PEP_INFORMATION

PEP_KERNEL_INFORMATION

PoFxRegisterPlugin