PoFxQueryCurrentComponentPerfState function (wdm.h)
The PoFxQueryCurrentComponentPerfState routine retrieves the active performance state in a component's performance state set.
Syntax
NTSTATUS PoFxQueryCurrentComponentPerfState(
[in] POHANDLE Handle,
[in] ULONG Flags,
[in] ULONG Component,
[in] ULONG SetIndex,
[in] PULONGLONG CurrentPerf
);
Parameters
[in] Handle
A handle that represents the registration of the device with power management framework (PoFx). The device driver previously received this handle from the PoFxRegisterDevice routine.
[in] Flags
Set to 0. Currently, no flags are defined for this routine.
[in] Component
The index that identifies the component whose performance state is being retrieved. This parameter is an index into the Components array in the PO_FX_DEVICE structure that the device driver used to register the device with PoFx. If the Components array contains N elements, component indexes range from 0 to N–1.
[in] SetIndex
The index that identifies the performance state set whose performance is being queried. This parameter is an index into the PerfStateSets array in the PO_FX_COMPONENT_PERF_INFO structure that the device driver used to register the component performance states with PoFx. If the PerfStateSets array contains N elements, performance state set indexes range from 0 to N–1.
[in] CurrentPerf
A pointer to variable in which the current performance state for the specified performance state set is returned. For more information about the value that is returned, see Remarks.
Return value
PoFxQueryCurrentComponentPerfState returns STATUS_SUCCESS if the requested operation succeeds. Possible error return values include the following status codes.
Return code | Description |
---|---|
|
The caller supplied an invalid index for the component or component state set. |
Remarks
A driver can call the PoFxQueryCurrentComponentPerfState routine to retrieve the current performance state of a given performance state set for a component. If the call succeeds, the CurrentPerf parameter is overwritten with a pointer to a value that specifies the current performance state of the set. This value may be one of the following, depending on the contents of the PO_FX_COMPONENT_PERF_SET structure that the driver passed to the PoFxRegisterComponentPerfStates routine:
- For a performance state set that represents a continuous distribution of performance states, this is a value between the Minimum and Maximum members of the PO_FX_COMPONENT_PERF_SET structure.
- For a performance state set that represents a discrete number of performance states, this value is an index into the States member of the PO_FX_COMPONENT_PERF_SET structure .
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows 10. |
Target Platform | Universal |
Header | wdm.h |
Library | Ntoskrnl.lib |
DLL | Ntoskrnl.exe |
IRQL | <= DISPATCH_LEVEL |