// wdm.h
NTSTATUS PoQueryPowerLimitAttributes(
PVOID PowerLimitRequest,
ULONG BufferCount,
PPOWER_LIMIT_ATTRIBUTES Buffer,
PULONG AttributeCount
);
View the official Windows Driver Kit DDI referenceNo description available.
This function queries the attributes of a power limit request object.
PowerLimitRequestA pointer to the power limit request object returned by PoCreatePowerLimitRequest.
BufferCountEntries of the parameter Buffer.
BufferA pre-allocated buffer to save POWER_LIMIT_ATTRIBUTES of each power limit types of power limit domains.
AttributeCountA pointer to save the number of attributes this platform supports. It should be the sum of power limit types of all domains.
Returns an NTSTATUS value.
The policy calls this interface twice and allocates a buffer in between:
Call with BufferCount = 0, Buffer = NULL, the OS will update AttributeCount.
Allocate continuous memory for AttributeCount of POWER_LIMIT_ATTRIBUTES.
Call with updated BufferCount and Buffer.