The ZwFlushBuffersFile routine is called by a file system filter driver to send a flush request for the specified file to the file system.
NTSYSAPI NTSTATUS ZwFlushBuffersFile( HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock );
Address of the caller's I/O status block. This parameter is required and cannot be NULL.
ZwFlushBuffersFile returns STATUS_SUCCESS or an appropriate NTSTATUS value, such as one of the following:
||The file resides on a write-protected volume; this is an error code.|
||The file resides on a volume that is not currently mounted; this is an error code.|
A file system filter driver can call ZwFlushBuffersFile to issue an IRP_MJ_FLUSH_BUFFERS request to the file system for a given file. The flush operation is synchronous.
Minifilter drivers should call FltFlushBuffers instead of calling ZwFlushBuffersFile.
Callers of ZwFlushBuffersFile must be running at IRQL = PASSIVE_LEVEL and with special kernel APCs enabled.
|Minimum supported client||Available starting with Windows Vista.|
|Header||ntifs.h (include Ntifs.h)|
|IRQL||PASSIVE_LEVEL (see Remarks section)|
|DDI compliance rules||PowerIrpDDis, HwStorPortProhibitedDDIs|