PMI_EVENT - NtDoc

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

typedef struct _PMI_EVENT {
  ULONG          Version;
  PMI_EVENT_TYPE EventType;
} PMI_EVENT, *PPMI_EVENT;
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-pmi-_pmi_event)

_PMI_EVENT structure

Description

The PMI_EVENT structure contains information about a power metering and budgeting event that is signaled through the Power Meter Interface (PMI).

Members

Version

A value that specifies the version of this structure. For Windows 7, Windows Server 2008 R2, and later versions of Windows, this value must be 1.

EventType

A PMI_EVENT_TYPE enumeration value that specifies the PMI event type.

Remarks

The PMI_EVENT structure contains information about a power metering or budgeting event. PMI generates an event for a power meter when one of the following occurs:

A user-mode service or application registers for notification of these events through an IOCTL_PMI_REGISTER_EVENT_NOTIFY I/O control (IOCTL) query request.

The PMI_EVENT structure does not contain the current PMI data for the event. Depending on the value of the EventType member, the caller can retrieve the current PMI data through a PMI IOCTL query request. The following table describes the PMI IOCTL to use to query the changed data from a power meter for a query request.

EventType value PMI IOCTL I/O request packet (IRP)
PmiCapabilitiesChangedEvent IOCTL_PMI_GET_CAPABILITIES The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains any PMI_CAPABILITIES_TYPE enumeration value.
PmiConfigurationChangedEvent IOCTL_PMI_GET_CONFIGURATION The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains any PMI_CONFIGURATION_TYPE enumeration value.
PmiThresholdEvent IOCTL_PMI_GET_CONFIGURATION The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains the PMI_CONFIGURATION_TYPE enumeration value or PmiThresholdConfiguration.
PmiBudgetEvent IOCTL_PMI_GET_CONFIGURATION The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains the PMI_CONFIGURATION_TYPE enumeration value or PmiBudgetConfiguration.
PmiAveragingIntervalChangedEvent IOCTL_PMI_GET_CONFIGURATION The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains the PMI_CONFIGURATION_TYPE enumeration value or PmiMeasurementConfiguration.

See also

IOCTL_PMI_GET_CAPABILITIES

IOCTL_PMI_GET_CONFIGURATION

IOCTL_PMI_REGISTER_EVENT_NOTIFY

IRP

PMI_CAPABILITIES_TYPE

PMI_CONFIGURATION_TYPE

PMI_EVENT_TYPE