// storport.h
ULONG StorPortPoFxSetPerfState(
PVOID HwDeviceExtension,
PSTOR_ADDRESS Address,
ULONG Component,
ULONG Flags,
ULONG SetIndex,
ULONG State,
PVOID Context
);
View the official Windows Driver Kit DDI referenceNo description available.
StorPortPoFxSetPerfState sets a component's P-state (performance or "perf" state).
HwDeviceExtensionPointer to the miniport's device extension.
AddressAddress of the device being registered. Currently only adapters are supported, so Address must be NULL.
ComponentThe index that identifies the component whose P-states will be managed. This parameter is an index into the Componentsarray in the STOR_POFX_DEVICE structure that the miniport used to register the device for Storport PoFx support. If the Components array contains N elements, component indexes range from 0 to N–1.
FlagsCurrently must be set to NULL.
SetIndexThe index of a previously registered perf set.
StateIf the perf set contains discrete P-States, this should be an index value. If the perf set is a range, this should be a value within that range.
ContextAn arbitrary context that will be passed to the perf set change callback.
StorPortPoFxSetPerfState returns STOR_STATUS_SUCCESS upon successful completion or if runtime power has been disabled, or an error code such as one of the following:
| Error code | Meaning |
|---|---|
| STOR_STATUS_INVALID_PARAMETER | One of the parameters is invalid; for example, Address or Flags are not NULL. |
| STOR_STATUS_UNSUCCESSFUL | The adapter isn't registered for idle detection. |