WdfControlDeviceInitSetShutdownNotification function (wdfcontrol.h)

[Applies to KMDF only]

The WdfControlDeviceInitSetShutdownNotification method sets shutdown notification information for a control device object.

Syntax

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

Parameters

DeviceInit

[in] A pointer to a WDFDEVICE_INIT structure that the driver obtained by calling WdfControlDeviceInitAllocate.

Notification

[in] A pointer to the driver's EvtDeviceShutdownNotification event callback function.

Flags

[in] One or more WDF_DEVICE_SHUTDOWN_FLAGS-typed flags that indicate when the EvtDeviceShutdownNotification callback function will be called.

Return value

None

Remarks

The driver must call WdfControlDeviceInitSetShutdownNotification before calling WdfDeviceCreate. For more information about calling WdfControlDeviceInitSetShutdownNotification, see Using Control Device Objects.

Examples

For a code example that uses WdfControlDeviceInitSetShutdownNotification, see WdfControlDeviceInitAllocate.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.0
Header wdfcontrol.h (include Wdf.h)
Library Wdf01000.sys (see Framework Library Versioning.)
IRQL <= DISPATCH_LEVEL
DDI compliance rules ControlDeviceInitAPI, DriverCreate, KmdfIrql, KmdfIrql2

See also

EvtDeviceShutdownNotification

WDFDEVICE_INIT

WDF_DEVICE_SHUTDOWN_FLAGS

WdfDeviceCreate