ioUnregisterPlugPlayNotification 函数 (wdm.h)

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

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)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI 符合性规则 HwStorPortProhibitedDDI (storport) PowerIrpDDis (wdm)

另请参阅

IoRegisterPlugPlayNotification

IoUnregisterPlugPlayNotificationEx