IoUnregisterPlugPlayNotification 函数 (wdm.h)

此例程在 Windows 7 及更高版本中已过时。 有关详细信息,请参阅下面的 备注 部分。

IoUnregisterPlugPlayNotification 例程删除了 PnP 事件的驱动程序回调例程的注册。

语法

NTSTATUS IoUnregisterPlugPlayNotification(
  [in] PVOID NotificationEntry
);

参数

[in] NotificationEntry

指向表示要删除的注册的不透明值的指针。 上一次调用 ioRegisterPlugPlayNotification返回该值。

返回值

如果 NotificationEntry 有效,则 IoUnregisterPlugPlayNotification 始终返回STATUS_SUCCESS。

言论

在 Windows 7 及更高版本的 Windows 中,此函数已过时,仅用于支持现有驱动程序。 请改用 IoUnregisterPlugPlayNotificationEx 例程。

系统在执行通知例程和 IoUnregisterPlugPlayNotification之间不会同步。 因此,可以在返回 IoUnregisterPlugPlayNotification 方法后调用例程。 如有必要,驱动程序应实现自己的机制,以在调用 IoUnregisterPlugPlayNotification 后忽略任何通知。

IoUnregisterPlugPlayNotification 删除一个 PnP 通知注册;也就是说,注册一个 PnP 事件类别的一个驱动程序回调例程。

驱动程序应首先取消注册通知,然后释放任何相关的上下文缓冲区。

在删除所有 PnP 通知注册之前,无法卸载驱动程序,因为每个活动注册的驱动程序对象都有引用。

要求

要求 价值
目标平台 普遍
标头 wdm.h (包括 Wdm.h、Ntddk.h、Ntifs.h)
NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI 符合性规则 HwStorPortProhibitedDIS(storport)PowerIrpDDis(wdm)

另请参阅

IoRegisterPlugPlayNotification

IoUnregisterPlugPlayNotificationEx