IAdapterPowerManagement::QueryPowerChangeState method

The QueryPowerChangeState method is called by PortCls in response to the receipt of an IRP_MN_QUERY_POWER power IRP.

Syntax


NTSTATUS QueryPowerChangeState(
  [in] POWER_STATE NewStateQuery
);

Parameters

NewStateQuery [in]

Specifies the new power state that is being requested for the device. This parameter is a union of type POWER_STATE. The new power state (NewStateQuery.DeviceState) can be one of the DEVICE_POWER_STATE enumeration values listed in IAdapterPowerManagement::PowerChangeState.

Return value

QueryPowerChangeState returns STATUS_SUCCESS if call was successful. Otherwise, the method returns an appropriate error code.

Remarks

PortCls calls the QueryPowerChangeState method on behalf of the system to query the adapter driver for acceptability of a potential device power-state change. The driver can deny the power state change by returning a value other than STATUS_SUCCESS. A call to QueryPowerStateChange is not guaranteed to occur prior to all PowerChangeState calls.

The code for this method must reside in paged memory.

Requirements

Target platform

Universal

Header

Portcls.h (include Portcls.h)

See also

IRP_MN_QUERY_POWER
IAdapterPowerManagement::PowerChangeState

 

 

Send comments about this topic to Microsoft

Show: