IOCTL_PMI_SET_CONFIGURATION IOCTL

The IOCTL_PMI_SET_CONFIGURATION request sets the configuration data for a power meter.

Major Code

IRP_MJ_DEVICE_CONTROL

Input Buffer

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.

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 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.

Output Buffer

None.

Output Buffer Length

None.

Status Block

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:

Remarks

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.

Requirements

   
Windows version Available in Windows 7, Windows Server 2008 R2, and later versions of the Windows operating systems.
Header pmi.h (include Pmi.h)

See Also

IO_STACK_LOCATION

IRP

PMI_CONFIGURATION

PMI_REPORTED_CAPABILITIES