Platform SDK: Files and I/O

Reparse Point Tags

Each reparse point has an identifier tag so that you can efficiently differentiate between the different types of reparse points, without having to examine the user-defined data in the reparse point. Windows 2000 has a set of predefined tags and a range of tags reserved for Microsoft. If you use any of the reserved tags when setting a reparse point, the operation fails. Tags not included in these ranges are not reserved and are available for your application.

When you set a reparse point, you must tag the data to be placed in the reparse point. After the reparse point has been established, a new set operation fails if the tag for the new data does not match the tag for the existing data. If the tags match, the set operation overwrites the existing reparse point.

Tag Contents

Reparse tags are stored as ULONG values. The bits define certain attributes, as shown in the following diagram.

   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  +-+-+-+-------------------------+-------------------------------+
  |M|L|N|   Reserved bits         |           Tag Value           |
  +-+-+-+-------------------------+-------------------------------+

The low 16 bits determine the kind of reparse point. The high 16 bits have 13 bits reserved for future use and 3 bits that denote specific attributes of the tags and the data represented by the reparse point. The following table describes these bits.

Bit Description
M Microsoft bit. If this bit is set, the tag is owned by Microsoft. All other tags must use zero for this bit.
L High-latency bit. If this bit is set, the operating system is expected to be slow to retrieve the first byte of data. Your application should display some indication to the user that the operation is in progress.
N Name surrogate bit. If this bit is set, the file represents another named entity in the system.

A set of macros is defined in the Winnt.h header file to assist in testing tags. The set includes:

Each macro returns a nonzero value if the associated bit is set.

To ensure uniqueness of tags, Microsoft provides a mechanism to distribute new tags. For more information, see the Microsoft® Installable File System (IFS) kit.