// pmi.h
typedef struct _PMI_EVENT {
ULONG Version;
PMI_EVENT_TYPE EventType;
} PMI_EVENT, *PPMI_EVENT;
View the official Windows Driver Kit DDI referenceNo description available.
The PMI_EVENT structure contains information about a power metering and budgeting event that is signaled through the Power Meter Interface (PMI).
VersionA 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.
EventTypeA PMI_EVENT_TYPE enumeration value that specifies the PMI event type.
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. |
IOCTL_PMI_REGISTER_EVENT_NOTIFY