// pmi.h
// CTL_CODE(0x0045, 0x002, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_PMI_SET_CONFIGURATION 0x00458008
View the official Windows Driver Kit DDI referenceNo description available.
The IOCTL_PMI_SET_CONFIGURATION request sets the configuration data for a power meter.
The AssociatedIrp.SystemBuffer member of the I/O request packet (IRP) points to an initiator-allocated input buffer that contains a PMI_CONFIGURATION structure. This structure contains the configuration data.
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 input buffer that is pointed to by the AssociatedIrp.SystemBuffer member. This size must be greater than or equal to sizeof(PMI_CONFIGURATION) or the request fails with an error status of STATUS_BUFFER_TOO_SMALL.
None.
None.
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:
STATUS_BUFFER_TOO_SMALL
The Parameters.DeviceIoControl.OutputBufferLength member of the IRP is less than the size, in bytes, of a PMI_CONFIGURATION structure.
The WDM driver that supports the PMI interface has completed the IOCTL request successfully.
The IOCTL_PMI_SET_CONFIGURATION request sets the configuration parameters for the power meter. The AssociatedIrp.SystemBuffer member of the IRP references a buffer that contains a PMI_CONFIGURATION structure. The ConfigurationType member of this structure contains information about the type of PMI configuration data to set in the power meter.
Only PMI configuration data that the power meter supports with read/write permissions can be changed by using a set request of IOCTL_PMI_SET_CONFIGURATION. A set request of IOCTL_PMI_SET_CONFIGURATION to change read-only PMI configuration data will fail, and the data will not be changed on the power meter.
Note Beginning with Windows 7 and Windows Server 2008 R2, the power meter can also support read/write permissions to its budgeting information. For more information, see PMI_REPORTED_CAPABILITIES.