Bewerken

Delen via


IPowerNotify interface (portcls.h)

The IPowerNotify interface is an optional interface that miniport drivers can expose if they require advance notification of impending power-state changes. To determine whether the miniport driver supports the IPowerNotify interface, the port driver calls the miniport driver object's QueryInterface method with REFIID IID_IPowerNotify. The following miniport driver types can support IPowerNotify:

IMiniportWavePci

IMiniportWaveCyclic

IMiniportMidi

IMiniportDMus

IMiniportTopology

IPowerNotify inherits from the IUnknown interface.

The IPowerNotify interface provides a single method that the port driver calls to notify the miniport driver when a change in power state occurs.

For example, when the operating system tells a wave audio device to go to a sleep state, the port driver pauses any active streams and then calls the power-notification callback to inform the miniport driver of the impending power down. The miniport driver then has an opportunity to save any necessary context before the adapter's PowerChangeState method is called.

The process is reversed when the device is powering up. PortCls first calls the adapter's PowerChangeState method to power up the adapter. The port driver then calls the miniport driver's callback to allow the miniport driver to restore its context. Finally, the port driver unpauses any previously paused active audio streams.

For more information, see Implementing IPowerNotify.

Inheritance

The IPowerNotify interface inherits from the IUnknown interface. IPowerNotify also has these types of members:

Methods

The IPowerNotify interface has these methods.

 
IPowerNotify::PowerChangeNotify

The PowerChangeNotify method notifies the miniport driver of changes in the power state.

Requirements

Requirement Value
Target Platform Windows
Header portcls.h