EvtDeviceReportedMissing
EvtDeviceUsageNotificationEx
EvtDeviceWdmIrpDispatch
EvtDeviceWdmPostPoFxRegisterDevice
EvtDeviceWdmPrePoFxUnregisterDevice
WDF_DEVICE_INTERFACE_PROPERTY_DATA
WDF_DEVICE_INTERFACE_PROPERTY_DATA_INIT
WDF_DEVICE_PROPERTY_DATA
WDF_DEVICE_PROPERTY_DATA_INIT
WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS
WDF_EVENT_TYPE
WDF_IO_TYPE_CONFIG
WDF_IO_TYPE_CONFIG_INIT
WDF_POWER_FRAMEWORK_SETTINGS
WDF_POWER_FRAMEWORK_SETTINGS_INIT
WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE
WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE
WDF_REMOVE_LOCK_OPTIONS
WDF_REMOVE_LOCK_OPTIONS_FLAGS
WDF_REMOVE_LOCK_OPTIONS_INIT
WdfDeviceAllocAndQueryInterfaceProperty method
WdfDeviceAllocAndQueryPropertyEx method
WdfDeviceAssignInterfaceProperty method
WdfDeviceAssignProperty method
WdfDeviceConfigureWdmIrpDispatchCallback method
WdfDeviceGetDeviceStackIoType method
WdfDeviceGetHardwareRegisterMappedAddress
WdfDeviceInitSetIoTypeEx method
WdfDeviceInitSetReleaseHardwareOrderOnFailure method
WdfDeviceInitSetRemoveLockOptions method
WdfDeviceMapIoSpace
WdfDeviceOpenDevicemapKey method
WdfDevicePostEvent
WdfDeviceQueryInterfaceProperty method
WdfDeviceQueryPropertyEx method
WdfDeviceReadFromHardware
WdfDeviceResumeIdleWithTag method
WdfDeviceStopIdleWithTag method
WdfDeviceUnmapIoSpace
WdfDeviceWdmAssignPowerFrameworkSettings method
WdfDeviceWdmDispatchIrp method
WdfDeviceWdmDispatchIrpToIoQueue method
WdfDeviceWriteToHardware
WdfFdoInitAllocAndQueryPropertyEx method
WdfFdoInitQueryPropertyEx method
展开 最小化

EvtFileClose

A driver's EvtFileClose callback function handles operations that must be performed when all of an application's accesses to a device have been closed.

语法

EVT_WDF_FILE_CLOSE EvtFileClose;

VOID EvtFileClose(
  __in  WDFFILEOBJECT FileObject
)
{ ... }

参数

FileObject [in]

A handle to a framework file object, which was previously received by the driver's EvtDeviceFileCreate callback function.

返回值

None

评论

The framework calls a driver's EvtFileClose callback function when the last handle for a file object has been closed and released, and all outstanding I/O requests have been completed or canceled.

The device might not be in its working (D0) state.

Before the framework calls a driver's EvtFileClose callback function, it calls the driver's EvtFileCleanup callback function.

The EvtFileClose callback function is called synchronously, in an arbitrary thread context.

To register an EvtFileClose callback function, the driver must call the WdfDeviceInitSetFileObjectConfig method.

For more information about framework file objects and the EvtFileClose callback function, see Framework File Objects.

示例

The function type is declared in Wdfdevice.h, as follows.

typedef VOID
 (EVT_WDF_FILE_CLOSE)(
    IN WDFFILEOBJECT  FileObject
    );

To define an EvtFileClose callback function that is named MyFileClose, you must first provide a function declaration that SDV and other verification tools require, as follows:

EVT_WDF_FILE_CLOSE MyFileClose;

Then, implement your callback function as follows:

VOID
 MyFileClose (
    IN WDFFILEOBJECT  FileObject
    )
  {...}

要求

版本

Supported by version 1.0 and later versions of KMDF.

标头

Wdfdevice.h (包括Wdf.h)

IRQL

PASSIVE_LEVEL

另请参见

WDF_FILEOBJECT_CONFIG

 

 

社区附加资源

添加
显示:
© 2015 Microsoft