DevicePowerEnumDevices function (powrprof.h)
Enumerates devices on the system that meet the specified criteria.
Syntax
BOOLEAN DevicePowerEnumDevices(
[in] ULONG QueryIndex,
[in] ULONG QueryInterpretationFlags,
[in] ULONG QueryFlags,
[out, optional] PBYTE pReturnBuffer,
[in, out] PULONG pBufferSize
);
Parameters
[in] QueryIndex
The index of the requested device. For initial calls, this value should be zero.
[in] QueryInterpretationFlags
The criteria applied to the search results.
[in] QueryFlags
The query criteria.
[out, optional] pReturnBuffer
Pointer to a buffer that receives the requested information.
[in, out] pBufferSize
The size, in bytes, of the return buffer.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
The values of the QueryFlags parameter may be combined to query for devices that support two or more criteria. For example; if PDCAP_D3_SUPPORTED | PDCAP_D1_SUPPORTED is passed as the QueryFlags parameter, the function will query for devices that support either D3 or D1.
QueryFlags also may be combined with QueryInterpretationFlags set to DEVICEPOWER_AND_OPERATION to produce a query of devices that support all of the requested criteria. For example; if PDCAP_D3_SUPPORTED | PDCAP_D1_SUPPORTED is passed as the QueryFlags parameter and DEVICEPOWER_AND_OPERATION is passed as the QueryInterpretationFlags parameter, the function will query devices that support both D3 and D1.
Examples
For an example that uses this function, see Using the Device Power API.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | powrprof.h |
Library | PowrProf.lib |
DLL | PowrProf.dll |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for