The IOCTL_PMI_GET_CONFIGURATION request returns information about the current configuration of a power meter.
The AssociatedIrp.SystemBuffer member of the I/O request packet (IRP) points to an initiator-allocated buffer that is used both as the input buffer and the output buffer for the request. On input, this buffer contains a PMI_CONFIGURATION structure in which the Version and ConfigurationType members are set to valid values. The ConfigurationType member contains a PMI_CONFIGURATION_TYPE enumeration value that specifies the type of configuration information to be retrieved from the power meter. This value also determines the type of configuration information to be written to the output buffer.
Input Buffer Length
The Parameters.DeviceIoControl.InputBufferLength member of the IRP's current I/O stack location (IO_STACK_LOCATION) is set to the size in bytes of the buffer pointed to by the AssociatedIrp.SystemBuffer member. This size must be greater than or equal to sizeof(PMI_CONFIGURATION) or the request will fail with an error status of STATUS_INVALID_PARAMETER.
If the request completes successfully, the buffer pointed to by the AssociatedIrp.SystemBuffer member contains a PMI_CONFIGURATION structure. This structure contains the requested configuration information.
Output Buffer Length
The Parameters.DeviceIoControl.OutputBufferLength member of the IRP's current I/O stack location is set to the size in bytes of the buffer pointed to by the AssociatedIrp.SystemBuffer member. For the request to succeed, this size must be greater than or equal to sizeof(PMI_CONFIGURATION). Otherwise, the request will fail with an error status of STATUS_BUFFER_TOO_SMALL.
The Information member is set to the size, in bytes, of a PMI_CONFIGURATION structure.
The Status member is set to one of the following values:
The IOCTL_PMI_GET_CONFIGURATION request queries the current configuration of the power meter. The input PMI_CONFIGURATION_TYPE enumeration value specifies the type of configuration data to be returned. The data type and contents of the output buffer vary based on the data requested.
The following table describes the type of data that is returned for the specified PMI_CONFIGURATION_TYPE enumeration value.
|PmiBudgetingConfiguration||A PMI_BUDGETING_CONFIGURATION structure that contains information about the budgeting configuration of the power meter.|
|PmiMeasurementConfiguration||A PMI_MEASUREMENT_CONFIGURATION structure that contains information about the measurement configuration of the power meter.|
|PmiThresholdConfiguration||A PMI_THRESHOLD_CONFIGURATION structure that contains information about the threshold configuration of the power meter.|
|Windows version||Available in Windows 7, Windows Server 2008 R2, and later versions of the Windows operating systems.|
|Header||pmi.h (include Pmi.h)|