WdfFdoInitSetFilter function

[Applies to KMDF and UMDF]

The WdfFdoInitSetFilter method identifies the calling driver as an upper-level or lower-level filter driver, for a specified device.

Syntax

void WdfFdoInitSetFilter(
  PWDFDEVICE_INIT DeviceInit
);

Parameters

DeviceInit

A pointer to a WDFDEVICE_INIT structure that the driver obtained from its EvtDriverDeviceAdd callback function.

Return Value

None

Remarks

Filter drivers typically process some I/O requests, but they simply pass most requests to the next driver in the driver stack. If the framework receives a request for one of your driver's devices, and if the driver has not created an I/O queue to receive requests that match the request type, the way the framework processes the request depends on whether the driver has called WdfFdoInitSetFilter:

  • If a driver calls WdfFdoInitSetFilter, the driver framework forwards the request to the next driver.

  • If a driver does not call WdfFdoInitSetFilter, the framework completes the request with a status value of STATUS_INVALID_DEVICE_REQUEST.

If a driver calls WdfFdoInitSetFilter, it should not call WdfDeviceInitSetIoType, WdfDeviceInitSetPowerInrush, or WdfDeviceInitSetPowerPageable because the framework ignores the information provided by these calls. Instead, the framework obtains this information from the next-lower device object in the driver's device stack.

The driver must call WdfFdoInitSetFilter before calling WdfDeviceCreate. For more information about calling WdfDeviceCreate, see Creating a Framework Device Object. In addition, the driver must call WdfFdoInitSetFilter before returning from its EvtDriverDeviceAdd callback function.

For more information about WdfFdoInitSetFilter, see Creating Device Objects in a Filter Driver, Creating I/O Queues and Forwarding I/O Requests.

Examples

The following code example identifies the calling driver as a filter driver for the specified device.

WdfFdoInitSetFilter(DeviceInit);

Requirements

   
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdffdo.h (include Wdf.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL PASSIVE_LEVEL
DDI compliance rules DeviceInitAPI, DriverCreate, DrvAckIoStop, KmdfIrql, KmdfIrql2

See Also

WDFDEVICE_INIT