WdfFdoInitSetFilter - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdffdo.h

VOID WdfFdoInitSetFilter(
  [in] PWDFDEVICE_INIT DeviceInit
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdffdo-wdffdoinitsetfilter)

WdfFdoInitSetFilter function

Description

[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.

Parameters

DeviceInit [in]

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

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, 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);

See also

WDFDEVICE_INIT