EVT_WDF_DEVICE_USAGE_NOTIFICATION_EX callback function (wdfdevice.h)

[Applies to KMDF and UMDF]

A driver's EvtDeviceUsageNotificationEx event callback function determines whether a device can support a special file type.

Syntax

EVT_WDF_DEVICE_USAGE_NOTIFICATION_EX EvtWdfDeviceUsageNotificationEx;

NTSTATUS EvtWdfDeviceUsageNotificationEx(
  [in] WDFDEVICE Device,
  [in] WDF_SPECIAL_FILE_TYPE NotificationType,
  [in] BOOLEAN IsInNotificationPath
)
{...}

Parameters

[in] Device

A handle to a framework device object.

[in] NotificationType

A WDF_SPECIAL_FILE_TYPE-typed value that identifies the type of special file that the system is storing on the specified device.

[in] IsInNotificationPath

A Boolean value which, if TRUE, indicates that the system has starting using the special file and, if FALSE, indicates that the system has finished using the special file.

Return value

If the driver determines that the device can support the special file, the EvtDeviceUsageNotificationEx callback function must return STATUS_SUCCESS or another status value for which NT_SUCCESS(status) equals TRUE. Otherwise it must return a status value for which NT_SUCCESS(status) equals FALSE.

Remarks

If your driver must provide driver-specific handling of special files, you must provide either an EvtDeviceUsageNotificationEx or an EvtDeviceUsageNotification event callback function. Do not provide both callback functions.

To register an EvtDeviceUsageNotificationEx callback function, a driver must call WdfDeviceInitSetPnpPowerEventCallbacks.

If the driver's EvtDeviceUsageNotificationEx callback function returns a failure status, the framework propagates failure to other stacks that it may have notified earlier.

For more information about special files, see Supporting Special Files.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.11
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)
IRQL PASSIVE_LEVEL