IFileCallbackCleanup::OnCleanupFile method (wudfddi.h)
[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]
The OnCleanupFile method cancels all I/O requests that a driver has pending in the framework queue.
Syntax
void OnCleanupFile(
[in] IWDFFile *pWdfFileObject
);
Parameters
[in] pWdfFileObject
A pointer to the IWDFFile interface for the file object that is associated with the device.
Return value
None
Remarks
A driver registers the IFileCallbackCleanup interface when the driver calls the IWDFDriver::CreateDevice method to create a device object.
The framework calls the OnCleanupFile method to notify the driver to cancel all I/O requests that it has pending. The framework notifies the driver in response to an application calling the Microsoft Win32 CloseHandle function.
For information about when the framework calls OnCleanupFile, see Driver-Created Versus Application-Created File Objects.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | wudfddi.h (include Wudfddi.h) |