EVT_WDF_FILE_CLOSE callback function (wdfdevice.h)

[Applies to KMDF and UMDF]

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.

Syntax

EVT_WDF_FILE_CLOSE EvtWdfFileClose;

void EvtWdfFileClose(
  WDFFILEOBJECT FileObject
)
{...}

Parameters

FileObject

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

Return value

None

Remarks

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.

Requirements

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

See also

WDF_FILEOBJECT_CONFIG