FltTagFile function (fltkernel.h)
FltTagFile sets a reparse tag on a file or directory.
Syntax
NTSTATUS FLTAPI FltTagFile(
[in] PFLT_INSTANCE InitiatingInstance,
[in] PFILE_OBJECT FileObject,
[in] ULONG FileTag,
[in, optional] GUID *Guid,
[in] PVOID DataBuffer,
[in] USHORT DataBufferLength
);
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 on which to set a reparse point. The file object must be opened for FILE_WRITE_DATA access. This parameter is required and cannot be NULL.
[in] FileTag
Reparse point tag. If an existing reparse tag is being modified, the tag specified in this parameter must match the tag of the reparse point to be modified.
[in, optional] Guid
GUID that uniquely identifies the type of reparse point. If FileTag is not a Microsoft tag, this parameter is required and cannot be NULL. If an existing reparse tag is being modified, the GUID specified in this parameter must match the GUID of the reparse point to be modified.
[in] DataBuffer
Pointer to a buffer that contains user-defined data for the reparse point.
[in] DataBufferLength
Size, in bytes, of the buffer that DataBuffer points to.
Return value
FltTagFile returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:
Return code | Description |
---|---|
|
FltTagFileEx encountered a pool allocation failure. This is an error code. |
|
The file system does not support reparse points. This is an error code. |
|
FileTag is not a Microsoft tag, and NULL was specified for Guid. This is an error code. |
|
The reparse tag specified by the caller did not match the tag of the reparse point to be modified. This is an error code. |
|
The reparse GUID specified by the caller did not match the GUID of the reparse point to be modified. This is an error code. |
Remarks
Minifilter drivers should use FltTagFile instead of FSCTL_SET_REPARSE_POINT to set a reparse point.
Not all file systems support reparse points. The NTFS file system supports them; the FAT file system does not. Minifilter drivers can determine whether a file system supports reparse points by calling FltQueryVolumeInformation, specifying FileFsAttributeInformation for the FsInformation parameter, and examining the FILE_SUPPORTS_REPARSE_POINTS bit flag in the returned FILE_FS_ATTRIBUTE_INFORMATION structure.
To remove an existing reparse point, call FltUntagFile.
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 |