Skip to content

Latest commit

 

History

History
124 lines (92 loc) · 7.28 KB

ns-wdfdevice-_wdf_fileobject_config.md

File metadata and controls

124 lines (92 loc) · 7.28 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NS:wdfdevice._WDF_FILEOBJECT_CONFIG
_WDF_FILEOBJECT_CONFIG (wdfdevice.h)
The WDF_FILEOBJECT_CONFIG structure contains configuration information of a driver's framework file objects.
wdf\wdf_fileobject_config.htm
wdf
02/26/2018
WDF_FILEOBJECT_CONFIG structure
*PWDF_FILEOBJECT_CONFIG, DFDeviceObjectGeneralRef_5f843338-f299-48d3-80ad-d5d35c122d0f.xml, PWDF_FILEOBJECT_CONFIG, PWDF_FILEOBJECT_CONFIG structure pointer, WDF_FILEOBJECT_CONFIG, WDF_FILEOBJECT_CONFIG structure, _WDF_FILEOBJECT_CONFIG, kmdf.wdf_fileobject_config, wdf.wdf_fileobject_config, wdfdevice/PWDF_FILEOBJECT_CONFIG, wdfdevice/WDF_FILEOBJECT_CONFIG
wdfdevice.h
Wdf.h
Windows
1.0
2.0
Windows
WDF_FILEOBJECT_CONFIG, *PWDF_FILEOBJECT_CONFIG
_WDF_FILEOBJECT_CONFIG
wdfdevice/_WDF_FILEOBJECT_CONFIG
PWDF_FILEOBJECT_CONFIG
wdfdevice/PWDF_FILEOBJECT_CONFIG
WDF_FILEOBJECT_CONFIG
wdfdevice/WDF_FILEOBJECT_CONFIG
APIRef
kbSyntax
HeaderDef
wdfdevice.h
_WDF_FILEOBJECT_CONFIG
PWDF_FILEOBJECT_CONFIG
WDF_FILEOBJECT_CONFIG

_WDF_FILEOBJECT_CONFIG structure

-description

[Applies to KMDF and UMDF]

The WDF_FILEOBJECT_CONFIG structure contains configuration information of a driver's framework file objects.

-struct-fields

-field Size

The size, in bytes, of this structure.

-field EvtDeviceFileCreate

A pointer to the driver's EvtDeviceFileCreate callback function, or NULL.

-field EvtFileClose

A pointer to the driver's EvtFileClose callback function, or NULL.

-field EvtFileCleanup

A pointer to the driver's EvtFileCleanup callback function, or NULL.

-field AutoForwardCleanupClose

A WDF_TRI_STATE-typed value. For more information about this member, see the following Comments section.

-field FileObjectClass

A WDF_FILEOBJECT_CLASS-typed value that identifies whether the driver requires a framework file object to represent each file that an application or another driver creates or opens. Additionally, this value specifies where the framework can store the object's handle.

-remarks

The WDF_FILEOBJECT_CONFIG structure is used as input to the WdfDeviceInitSetFileObjectConfig method.

WDF_FILEOBJECT_CONFIG must be initialized by calling WDF_FILEOBJECT_CONFIG_INIT.

Framework Behavior for AutoForwardCleanupClose

If AutoForwardCleanupClose is set to WdfTrue, the framework does the following:
  • The framework forwards file creation requests to the next-lower driver if the driver does not provide an EvtDeviceFileCreate callback function and has not called WdfDeviceConfigureRequestDispatching to set an I/O queue to receive file creation requests. The framework does not forward file creation requests if the driver provides a callback function or a queue to handle the requests, so the driver must forward, complete, or cancel the requests.
  • The framework sends file cleanup and close requests to the next-lower driver after calling the driver's EvtFileCleanup and EvtFileClose callback functions.
If AutoForwardCleanupClose is set to WdfFalse, the framework does not forward file creation, cleanup, or close requests. Instead, the framework completes the requests for the driver.

If AutoForwardCleanupClose is set to WdfUseDefault, the framework uses WdfTrue behavior for filter drivers and WdfFalse behavior for function drivers.

Driver Behavior for AutoForwardCleanupClose

Your driver's local I/O target must always receive an equal number of I/O requests with request types of WdfRequestTypeCreate, WdfRequestTypeCleanup, and WdfRequestTypeClose. Therefore, if the driver provides either an EvtDeviceFileCreate callback function or an I/O queue that receives file creation requests, you must use the following rules:
  • If your driver sets AutoForwardCleanupClose to WdfTrue, the driver must forward all file creation requests to the local I/O target. You must follow this rule because the framework will forward all cleanup and close requests to the local target, whether or not your driver provides EvtFileCleanup and EvtFileClose callback functions.
  • If your driver sets AutoForwardCleanupClose to WdfFalse, the driver must not forward file creation requests to the local I/O target. You must follow this rule because the framework will not forward cleanup and close requests to the local target, whether or not your driver provides EvtFileCleanup and EvtFileClose callback functions.
  • If your driver sets AutoForwardCleanupClose to WdfDefault, the driver must follow the rule for WdfTrue if it is a filter driver. The driver must follow the rule for WdfFalse if it is a function driver.