WdfControlDeviceInitSetShutdownNotification 函数 (wdfcontrol.h)

[仅适用于 KMDF]

WdfControlDeviceInitSetShutdownNotification 方法设置控制设备对象的关闭通知信息。

语法

void WdfControlDeviceInitSetShutdownNotification(
  [in] PWDFDEVICE_INIT                      DeviceInit,
  [in] PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification,
  [in] UCHAR                                Flags
);

参数

[in] DeviceInit

指向驱动程序通过调用 WdfControlDeviceInitAllocate获取的 WDFDEVICE_INIT 结构的指针。

[in] Notification

指向驱动程序 EvtDeviceShutdownNotification 事件回调函数的指针。

[in] Flags

一个或多个 WDF_DEVICE_SHUTDOWN_FLAGS类型标志,指示何时调用 EvtDeviceShutdownNotification 回调函数。

返回值

没有

言论

驱动程序必须先调用 WdfControlDeviceInitSetShutdownNotification,然后才能调用 WdfDeviceCreate。 有关调用 WdfControlDeviceInitSetShutdownNotification的详细信息,请参阅 使用控制设备对象

例子

有关使用 WdfControlDeviceInitSetShutdownNotification的代码示例,请参阅 WdfControlDeviceInitAllocate

要求

要求 价值
目标平台 普遍
最低 KMDF 版本 1.0
标头 wdfcontrol.h (包括 Wdf.h)
Wdf01000.sys(请参阅框架库版本控制。
IRQL <= DISPATCH_LEVEL
DDI 符合性规则 ControlDeviceInitAPI(kmdf)DriverCreate(kmdf)KmdfIrql(kmdf)KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

另请参阅

EvtDeviceShutdownNotification

WDFDEVICE_INIT

WDF_DEVICE_SHUTDOWN_FLAGS

WdfDeviceCreate