IPortClsPower::RegisterAdapterPowerManagement 方法 (portcls.h)

方法 RegisterAdapterPowerManagement 将适配器的电源管理接口注册到 PortCls。

语法

NTSTATUS RegisterAdapterPowerManagement(
  [in] PUNKNOWN       _pUnknown,
  [in] PDEVICE_OBJECT _DeviceObject
);

参数

[in] _pUnknown

指定指向 IUnknown 的指针。 . PortCls 查询适配器的 IAdapterPowerManagementIAdapterPowerManagement2 接口的此 IUnknown 对象。

[in] _DeviceObject

指定指向 DEVICE_OBJECT 结构的指针,该结构表示适配器的功能设备对象。

返回值

如果调用成功,方法 RegisterAdapterPowerManagement 将返回STATUS_SUCCESS。 否则,它将返回相应的错误代码。

注解

RegisterAdapterPowerManagement当 方法向 PortCls 注册适配器的电源管理接口时,它允许适配器驱动程序收到电源状态更改事件的通知。

要求

要求
最低受支持的客户端 在 Windows 7 和更高版本的 Windows 中可用。
目标平台 通用
标头 portcls.h (包括 Portcls.h)
IRQL PASSIVE_LEVEL。

另请参阅

DEVICE_OBJECT

IAdapterPowerManagement

IAdapterPowerManagement2

IPortClsPower