IOCTL_PMI_GET_MEASUREMENT IOCTL (pmi.h)
The IOCTL_PMI_GET_MEASUREMENT request returns the current measurement data from a power meter.
Major code
Input buffer
The initiator-allocated output buffer that is pointed to by the AssociatedIrp.SystemBuffer member of the IRP.
Input buffer length
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.
Output buffer
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.
Output buffer length
The size of a PMI_MEASUREMENT_DATA structure.
Status block
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.
STATUS_SUCCESS
The WDM driver that supports the PMI interface has completed the IOCTL request successfully.
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows 7, Windows Server 2008 R2, and later versions of the Windows operating systems. |
Header | pmi.h (include Pmi.h) |