poUnregisterFromEffectivePowerModeNotifications 函数 (wdm.h)
PoUnregisterFromEffectivePowerModeNotifications 函数从有效的电源模式更改通知中注销。 此函数旨在从清理代码调用,并将等待所有回调完成,然后再注销。
语法
NTSTATUS PoUnregisterFromEffectivePowerModeNotifications(
PO_EPM_HANDLE RegistrationHandle
);
参数
RegistrationHandle
对应于单个电源模式注册的句柄。 调用 PowerRegisterForEffectivePowerModeNotifications 后,调用方应保存此句柄,并传入此处。
返回值
如果调用成功,则返回S_OK (零) ;如果调用失败,则返回非零值。
注解
注册后,将立即使用电源设置的当前值调用回调。 如果在电源设置更改时注册,可能会收到多个回调;最后一个回调是最新的更新。
要求
要求 | 值 |
---|---|
最低受支持的客户端 | Windows 11,版本 24H2 |
标头 | wdm.h (包括 Wdm.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | PASSIVE_LEVEL |