FltUntagFile function (fltkernel.h)

FltUntagFile removes a reparse point from a file or directory.

Syntax

NTSTATUS FLTAPI FltUntagFile(
  [in]           PFLT_INSTANCE InitiatingInstance,
  [in]           PFILE_OBJECT  FileObject,
  [in]           ULONG         FileTag,
  [in, optional] GUID          *Guid
);

Parameters

[in] InitiatingInstance

Opaque instance pointer for the minifilter driver instance that initiated this I/O request. This parameter is required and cannot be NULL.

[in] FileObject

Pointer to a file object for the file or directory from which the reparse point is to be removed. The file object must be opened for FILE_WRITE_DATA access. This parameter is required and cannot be NULL.

[in] FileTag

Reparse point tag. The tag specified in this parameter must match the tag of the reparse point to be removed.

[in, optional] Guid

Globally unique identifier (GUID) that uniquely identifies the type of reparse point. If FileTag is not a Microsoft tag, this parameter is required and cannot be NULL. The GUID specified in this parameter must match the GUID of the reparse point to be removed.

Return value

FltUntagFile returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:

Return code Description
STATUS_IO_REPARSE_TAG_MISMATCH
The reparse tag specified by the caller did not match the tag of the reparse point to be deleted. This is an error code.
STATUS_REPARSE_ATTRIBUTE_CONFLICT
The reparse GUID specified by the caller did not match the GUID of the reparse point to be deleted. This is an error code.

Remarks

Minifilter drivers should use FltUntagFile instead of FSCTL_DELETE_REPARSE_POINT to delete a reparse point.

A minifilter driver can set a reparse tag on a file or directory by calling FltTagFile.

For more information about reparse points, see the Microsoft Windows SDK documentation.

Requirements

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

See also

FLT_TAG_DATA_BUFFER

FSCTL_DELETE_REPARSE_POINT

FSCTL_GET_REPARSE_POINT

FSCTL_SET_REPARSE_POINT

FltTagFile

IsReparseTagMicrosoft

IsReparseTagNameSurrogate