Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

FltTagFile function

FltTagFile sets a reparse tag on a file or directory.

Syntax


NTSTATUS FltTagFile(
  _In_      PFLT_INSTANCE InitiatingInstance,
  _In_      PFILE_OBJECT FileObject,
  _In_      ULONG FileTag,
  _In_opt_  GUID *Guid,
  _In_      PVOID DataBuffer,
  _In_      USHORT DataBufferLength
);

Parameters

InitiatingInstance [in]

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

FileObject [in]

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.

FileTag [in]

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.

Guid [in, optional]

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.

DataBuffer [in]

Pointer to a buffer that contains user-defined data for the reparse point.

DataBufferLength [in]

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 codeDescription
STATUS_INSUFFICIENT_RESOURCES

FltTagFile encountered a pool allocation failure. This is an error code.

STATUS_INVALID_DEVICE_REQUEST

The file system does not support reparse points. This is an error code.

STATUS_INVALID_PARAMETER

FileTag is not a Microsoft tag, and NULL was specified for Guid. This is an error code.

STATUS_IO_REPARSE_TAG_MISMATCH

The reparse tag specified by the caller did not match the tag of the reparse point to be modified. 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 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

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

PASSIVE_LEVEL

See also

FILE_FS_ATTRIBUTE_INFORMATION
FLT_CALLBACK_DATA
FLT_TAG_DATA_BUFFER
FltFsControlFile
FltQueryVolumeInformation
FltUntagFile
FSCTL_DELETE_REPARSE_POINT
FSCTL_GET_REPARSE_POINT
FSCTL_SET_REPARSE_POINT
IsReparseTagMicrosoft
IsReparseTagNameSurrogate
REPARSE_DATA_BUFFER
REPARSE_GUID_DATA_BUFFER

 

 

Send comments about this topic to Microsoft

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.