// wdfdevice.h
EVT_WDF_FILE_CLEANUP EvtWdfFileCleanup;
VOID EvtWdfFileCleanup(
[in] WDFFILEOBJECT FileObject
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
[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.
FileObject [in]A handle to a framework file object, which was previously received by the driver's EvtDeviceFileCreate callback function.
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.