IOCTL_PMI_GET_MEASUREMENT - NtDoc

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

// CTL_CODE(0x0045, 0x003, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_PMI_GET_MEASUREMENT 0x0045400C
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-pmi-ioctl_pmi_get_measurement)

IOCTL_PMI_GET_MEASUREMENT IOCTL

Description

The IOCTL_PMI_GET_MEASUREMENT request returns the current measurement data from a power meter.

Parameters

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.

Input/output buffer

Input/output buffer length

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.

See also

IOCTL_PMI_GET_CAPABILITIES

IOCTL_PMI_GET_CONFIGURATION

IO_STACK_LOCATION

IRP

PMI_CONFIGURATION_TYPE

PMI_MEASUREMENT_DATA