EVT_WDF_FILE_CLEANUP callback function (wdfdevice.h)

[Applies to KMDF and UMDF]

A driver's EvtFileCleanup callback function handles operations that must be performed when an application is closing all accesses to a device.

Syntax

EVT_WDF_FILE_CLEANUP EvtWdfFileCleanup;

void EvtWdfFileCleanup(
  [in] WDFFILEOBJECT FileObject
)
{...}

Parameters

[in] FileObject

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 EvtFileCleanup callback function when the last handle to the specified file object has been closed. (Because of outstanding I/O requests, this handle might not have been released.)

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

The EvtFileCleanup callback function is called synchronously, in the context of the thread that closed the last file object handle.

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

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

Requirements

Requirement Value
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