// pmi.h
// CTL_CODE(0x0045, 0x003, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_PMI_GET_MEASUREMENT 0x0045400C
View the official Windows Driver Kit DDI referenceNo description available.
The IOCTL_PMI_GET_MEASUREMENT request returns the current measurement data from a power meter.
The initiator-allocated output buffer that is pointed to by the AssociatedIrp.SystemBuffer member of the IRP.
The Parameters.DeviceIoControl.OutputBufferLength member of the IRP's current I/O stack location (IO_STACK_LOCATION) is set to the size in bytes of the initiator-allocated output buffer that is pointed to by the AssociatedIrp.SystemBuffer member of the IRP. This size must be greater than or equal to sizeof(PMI_MEASUREMENT_DATA) or the request fails with an error status of STATUS_BUFFER_TOO_SMALL.
If the request completes successfully, the output buffer pointed to by the AssociatedIrp.SystemBuffer member contains a PMI_MEASUREMENT_DATA structure. This structure contains the requested measurement data.
The size of a PMI_MEASUREMENT_DATA structure.
The Information member is set to the size, in bytes, of a PMI_MEASUREMENT_DATA structure.
The Status member is set to one of the following values:
STATUS_BUFFER_TOO_SMALL
The Parameters.DeviceIoControl.OutputBufferLength member of the IRP is less than the size, in bytes, of a PMI_MEASUREMENT_DATA structure.
The WDM driver that supports the PMI interface has completed the IOCTL request successfully.
The IOCTL_PMI_GET_MEASUREMENT request queries the current measurement data from the power meter. This measurement data is sampled and averaged based on the power meter's measurement configuration parameters. The measurement configuration parameters are queried through the IOCTL_PMI_GET_CONFIGURATION request with an input PMI_CONFIGURATION_TYPE value of PmiMeasurementConfiguration.