Bewerken

Delen via


IFileCallbackClose::OnCloseFile 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 OnCloseFile method is called when the last reference count on a file object goes down to zero and before the file object is released.

Syntax

void OnCloseFile(
  [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 IFileCallbackClose interface when the driver calls the IWDFDriver::CreateDevice method to create a device object.

For information about when the framework calls OnCloseFile, see Driver-Created Versus Application-Created File Objects.

Requirements

Requirement Value
Target Platform Windows
Header wudfddi.h (include Wudfddi.h)

See also

IFileCallbackClose

IWDFDriver::CreateDevice

IWDFFile