Edit

Share via


PoQueryPowerLimitAttributes function (wdm.h)

This function queries the attributes of a power limit request object.

Syntax

NTSTATUS PoQueryPowerLimitAttributes(
  PVOID                   PowerLimitRequest,
  ULONG                   BufferCount,
  PPOWER_LIMIT_ATTRIBUTES Buffer,
  PULONG                  AttributeCount
);

Parameters

PowerLimitRequest

A pointer to the power limit request object returned by PoCreatePowerLimitRequest.

BufferCount

Entries of the parameter Buffer.

Buffer

A pre-allocated buffer to save POWER_LIMIT_ATTRIBUTES of each power limit types of power limit domains.

AttributeCount

A pointer to save the number of attributes this platform supports. It should be the sum of power limit types of all domains.

Return value

Returns an NTSTATUS value.

Remarks

The policy calls this interface twice and allocates a buffer in between:

  1. Call with BufferCount = 0, Buffer = NULL, the OS will update AttributeCount.

  2. Allocate continuous memory for AttributeCount of POWER_LIMIT_ATTRIBUTES.

  3. Call with updated BufferCount and Buffer.

Requirements

Requirement Value
Header wdm.h (include Wdm.h)

See also

PoCreatePowerLimitRequest

PoDeletePowerLimitRequest

PoQueryPowerLimitValue

PoSetPowerLimitValue

POWER_LIMIT_ATTRIBUTES

POWER_LIMIT_TYPES

POWER_LIMIT_VALUE