FltSetInformationFile function

Download EaseFilter Filter Driver SDK Setup File
Download EaseFilter Filter Driver SDK Zip File

FltSetInformationFile sets information for a given file.


NTSTATUS FLTAPI FltSetInformationFile(
  PFLT_INSTANCE          Instance,
  PFILE_OBJECT           FileObject,
  PVOID                  FileInformation,
  ULONG                  Length,



Opaque instance pointer for the caller. This parameter is required and cannot be NULL.


File object pointer for the file. This parameter is required and cannot be NULL.


Pointer to a caller-allocated buffer that contains information to be set for the file. The FileInformationClass parameter specifies the type of information. This parameter is required and cannot be NULL.


Size, in bytes, of the FileInformation buffer.


Specifies the type of information to be set for the file. The following values are defined.

Value Meaning
FileAllocationInformation Set FILE_ALLOCATION_INFORMATION for the file.
FileBasicInformation Set FILE_BASIC_INFORMATION for the file.
FileDispositionInformation Set FILE_DISPOSITION_INFORMATION for the file.
FileEndOfFileInformation Set FILE_END_OF_FILE_INFORMATION for the file.
FileLinkInformation Set FILE_LINK_INFORMATION for the file.
FilePositionInformation Set FILE_POSITION_INFORMATION for the file.
FileRenameInformation Set FILE_RENAME_INFORMATION for the file. For more information about file renaming, see the following Remarks section.
FileValidDataLengthInformation Set FILE_VALID_DATA_LENGTH_INFORMATION for the file.

Return value

FltSetInformationFile returns STATUS_SUCCESS or an appropriate NTSTATUS value.


A minifilter driver calls FltSetInformationFile to set information for a given file. The file must currently be open.

A file rename operation imposes the following restriction on the parameter values passed to FltSetInformationFile: As noted in the reference entry for FILE_RENAME_INFORMATION, a file or directory can only be renamed within a volume. In other words, a rename operation cannot cause a file or directory to be moved to a different volume. Unlike ZwSetInformationFileFltSetInformationFile does not validate the contents of the FILE_RENAME_INFORMATION structure. Thus the caller of FltSetInformationFile is responsible for ensuring that the new name for the file or directory is on the same volume as the old name.

Minifilter drivers must use FltSetInformationFile , not ZwSetInformationFile, to rename a file.


Target Platform Universal
Header fltkernel.h (include Fltkernel.h)
Library FltMgr.lib
DLL Fltmgr.sys