PEP_POWER_CONTROL_REQUEST structure (pepfx.h)

The PEP_POWER_CONTROL_REQUEST structure contains a request from a driver for a power control operation.

Syntax

typedef struct _PEP_POWER_CONTROL_REQUEST {
  [in]  PEPHANDLE DeviceHandle;
  [in]  LPCGUID   PowerControlCode;
  [in]  PVOID     InBuffer;
  [in]  SIZE_T    InBufferSize;
  [in]  PVOID     OutBuffer;
  [in]  SIZE_T    OutBufferSize;
  [out] SIZE_T    BytesReturned;
  [out] NTSTATUS  Status;
} PEP_POWER_CONTROL_REQUEST, *PPEP_POWER_CONTROL_REQUEST;

Members

[in] DeviceHandle

A PEPHANDLE value that identifies the device. The PEP supplied this handle in response to a previous PEP_DPM_REGISTER_DEVICE notification.

[in] PowerControlCode

A pointer to a GUID value that specifies the power control operation to perform. This is the same value that the requesting driver supplied as the PowerControlCode parameter to the PoFxPowerControl routine.

[in] InBuffer

A pointer to a driver-allocated input buffer that contains the input parameters for this power control operation. This is the same value that the requesting driver supplied as the InBuffer parameter to the PoFxPowerControl routine.

[in] InBufferSize

The size in bytes of the buffer pointed to by InBuffer. This is the same value that the requesting driver supplied as the InBufferSize parameter to the PoFxPowerControl routine.

[in] OutBuffer

A pointer to a driver-allocated output buffer to which the PEP writes the results of this power control operation. This is the same value that the requesting driver supplied as the OutBuffer parameter to the PoFxPowerControl routine.

[in] OutBufferSize

The size in bytes of the buffer pointed to by OutBuffer.

[out] BytesReturned

The number of bytes that the PEP wrote to the output buffer pointed to by OutBuffer.

[out] Status

The status of the requested power control operation. If the operation is successful, the PEP sets this member to STATUS_SUCCESS. Otherwise, the PEP sets this member to an appropriate error status code.

Remarks

This structure is used by the PEP_DPM_POWER_CONTROL_REQUEST notification. The first six members of the structure contain input values that are supplied by the Windows power management Framework (PoFx). The last two members contain values that the PEP writes to the structure in response to this notification. In addition, the PEP writes to the output buffer pointed to by the OutBuffer member.

If the output buffer is too small to receive all of the result data from the operation, the PEP sets the Status member of the structure to STATUS_INSUFFICIENT_RESOURCES, sets the BytesReturned member to the required size of the output buffer, and (typically) writes no data to the output buffer.

The driver for a device can call the PoFxPowerControl routine to request a power control operation on the device. During this call, PoFx delegates the handling of this request to the PEP that owns the device. The PowerControlCode member of the PEP_POWER_CONTROL_REQUEST structure contains a custom control code whose meaning is understood by both the driver and the PEP for the device.

Requirements

Requirement Value
Minimum supported client Supported starting with Windows 10.
Header pepfx.h (include Pep_x.h)

See also

PEP_DPM_POWER_CONTROL_REQUEST

PEP_DPM_REGISTER_DEVICE

PoFxPowerControl