Is NtCreateFile with FILE_OPEN_REPARSE_POINT supported for relative directory opens on Windows 11?

Turn U- 0 Reputation points
2026-11-03T09:15:30.1133333+00:00

Dear Microsoft Windows SDK Support,

I am requesting an authoritative clarification of the supported user-mode API contract for NtCreateFile on Windows 11.

The intended use is a read-only metadata inspection mechanism that opens one filesystem path component at a time, relative to an independently authorized parent directory handle.

Proposed configuration:

  • API: NtCreateFile
  • RootDirectory: an existing filesystem directory handle
  • ObjectName: exactly one relative path component
  • OBJECT_ATTRIBUTES.Attributes: OBJ_CASE_INSENSITIVE
  • DesiredAccess: FILE_READ_ATTRIBUTES
  • CreateDisposition: FILE_OPEN
  • CreateOptions: FILE_OPEN_REPARSE_POINT
  • Neither FILE_DIRECTORY_FILE nor FILE_NON_DIRECTORY_FILE is specified.

No file creation, content modification, deletion, or permission changes are intended.

Questions requiring authoritative clarification:

  1. Is this exact combination officially supported for opening existing filesystem directories from user mode?
  2. Does FILE_OPEN_REPARSE_POINT guarantee that the named final component is opened without following its filesystem reparse point, including symbolic links, junctions, and mount points?
  3. Can a successfully opened directory handle subsequently be used as RootDirectory for another single-component relative open under the documented contract?
  4. Are there filesystem, Windows-version, filter-driver, cloud-file, or other qualifications, including possible side effects during metadata-only opens?
  5. Can Microsoft identify published normative documentation or provide a support statement confirming these guarantees and their limitations?

I understand that establishing the initial trusted handle, concurrency protection, and authorization are separate requirements. A successful runtime experiment is not being treated as proof of API support.

If these guarantees cannot be provided, please state that explicitly rather than assuming the configuration is supported.

Thank you. Dear Microsoft Windows SDK Support,

I am requesting an authoritative clarification of the supported user-mode API contract for NtCreateFile on Windows 11.

The intended use is a read-only metadata inspection mechanism that opens one filesystem path component at a time, relative to an independently authorized parent directory handle.

Proposed configuration:

  • API: NtCreateFile
  • RootDirectory: an existing filesystem directory handle
  • ObjectName: exactly one relative path component
  • OBJECT_ATTRIBUTES.Attributes: OBJ_CASE_INSENSITIVE
  • DesiredAccess: FILE_READ_ATTRIBUTES
  • CreateDisposition: FILE_OPEN
  • CreateOptions: FILE_OPEN_REPARSE_POINT
  • Neither FILE_DIRECTORY_FILE nor FILE_NON_DIRECTORY_FILE is specified.

No file creation, content modification, deletion, or permission changes are intended.

Questions requiring authoritative clarification:

  1. Is this exact combination officially supported for opening existing filesystem directories from user mode?
  2. Does FILE_OPEN_REPARSE_POINT guarantee that the named final component is opened without following its filesystem reparse point, including symbolic links, junctions, and mount points?
  3. Can a successfully opened directory handle subsequently be used as RootDirectory for another single-component relative open under the documented contract?
  4. Are there filesystem, Windows-version, filter-driver, cloud-file, or other qualifications, including possible side effects during metadata-only opens?
  5. Can Microsoft identify published normative documentation or provide a support statement confirming these guarantees and their limitations?

I understand that establishing the initial trusted handle, concurrency protection, and authorization are separate requirements. A successful runtime experiment is not being treated as proof of API support.

If these guarantees cannot be provided, please state that explicitly rather than assuming the configuration is supported.

Thank you.

Windows development | Windows API - Win32
0 comments No comments

2 answers

Sort by: Most helpful
  1. Harry Nguyen (WICLOUD CORPORATION) 610 Reputation points Microsoft External Staff Moderator
    2026-11-03T10:58:19.93+00:00

    Hi @Turn U- ,

    Thank you for the clearly scoped question, and for separating the initial trusted handle, concurrency protection, and authorization from this one. I'll keep this answer focused on what the published documentation establishes for this configuration and how that maps to your design.

    1. Opening an existing directory with this combination

    The user-mode NtCreateFile (winternl.h) documentation describes the function as able to open an existing file or directory, lists zero or OBJ_CASE_INSENSITIVE as the valid Attributes values, and does not restrict FILE_READ_ATTRIBUTES for directories (only FILE_READ_DATA, FILE_WRITE_DATA, FILE_APPEND_DATA, and FILE_EXECUTE are called out as not to be used). So the individual parameters you chose are consistent with the documentation.

    Omitting FILE_DIRECTORY_FILE also lines up with the documentation, because the list of CreateOptions flags compatible with FILE_DIRECTORY_FILE does not include FILE_OPEN_REPARSE_POINT. The consequence is that the call itself does not enforce that the target is a directory. Since your handle has FILE_READ_ATTRIBUTES, the recommended approach is to read the attributes on the returned handle and confirm the object is a directory before continuing.

    2. Reparse point behavior on the final component

    The documentation states that when FILE_OPEN_REPARSE_POINT is specified and the file being opened has a reparse point, normal reparse processing does not occur and NtCreateFile attempts to directly open the reparse point file. Mounted folders and symbolic links are implemented as reparse points, identified by the IO_REPARSE_TAG_MOUNT_POINT and IO_REPARSE_TAG_SYMLINK tags (Determining Whether a Directory Is a Mounted Folder), so they fall under this behavior. Based on this, the expected result is that the handle refers to the reparse point itself rather than its target. CreateFile documents the same outcome explicitly for symbolic links with FILE_FLAG_OPEN_REPARSE_POINT.

    For your inspection logic, this means that once you see FILE_ATTRIBUTE_REPARSE_POINT on the opened component, you can check the reparse tag (the linked article shows how to read it and compare it against values such as IO_REPARSE_TAG_MOUNT_POINT and IO_REPARSE_TAG_SYMLINK) and decide how your tool should treat that entry, instead of relying on the open to classify it for you.

    3. Reusing the handle as RootDirectory

    This is directly documented: RootDirectory can be a handle to a directory obtained by a preceding call to NtCreateFile, and ObjectName is then interpreted relative to that directory. So chaining single-component opens from a directory handle matches the documented model.

    The documentation describes this in terms of a directory handle. It does not describe using a handle that was opened on a reparse point itself, such as a junction opened with FILE_OPEN_REPARSE_POINT, as RootDirectory. Based on that, the safest design is to use a handle as the next RootDirectory only after confirming it is a directory without the reparse point attribute, and to handle reparse point entries separately as described in point 2.

    4. Qualifications

    Reparse Points and File Operations notes that reparse point behavior depends on the specific implementation and its associated file system filter. That means third-party reparse implementations and filter drivers are part of the environment your tool needs to account for. The driver-side NtCreateFile (ntifs.h) reference also shows that file system behavior can change between versions (for example, the Windows 11 version 24H2 NTFS change for FILE_NON_DIRECTORY_FILE). For offline or virtualized files, the same reference documents FILE_OPEN_NO_RECALL, which instructs filters that perform offline storage or virtualization not to recall file contents as a result of the open. This is relevant if you want to avoid side effects during metadata-only opens.

    5. Normative documentation or support statement

    To state it explicitly as you asked: the published documentation covers the individual pieces above (relative opens through RootDirectory, the general FILE_OPEN_REPARSE_POINT behavior, and reuse of an NtCreateFile directory handle as RootDirectory). It does not provide a single normative guarantee for this exact combination across all Windows versions, file systems, and filter drivers. If you need a formal support statement at that level, opening a case with Microsoft Support would be the appropriate path.

    I hope this helps clarify how the documentation applies to your design.

    If you found this helpful, you can refer to this guidance to confirm it and help others with similar questions.

    Thank you.

    Was this answer helpful?

    1 person found this answer helpful.

  2. AI answer

    2026-11-03T09:15:55.0366667+00:00

    The published documentation supports only part of that contract.

    • NtCreateFile supports relative naming through RootDirectory. When RootDirectory is non-NULL, ObjectName is interpreted relative to the directory represented by that handle.
    • FILE_OPEN_REPARSE_POINT is documented for NtCreateFile: if that flag is specified and the target being opened has a reparse point, normal reparse processing does not occur and NtCreateFile attempts to directly open the reparse point file. If the flag is not specified, normal reparse processing occurs.
    • A successfully opened directory handle can be used later as RootDirectory, because the parameter documentation states that RootDirectory can be a handle to a directory obtained by a preceding call to NtCreateFile.

    What the published documentation does not establish:

    • It does not explicitly state that the exact user-mode combination for opening an existing filesystem directory with CreateOptions = FILE_OPEN_REPARSE_POINT and neither FILE_DIRECTORY_FILE nor FILE_NON_DIRECTORY_FILE is an officially supported directory-open contract on Windows 11.
    • It does not provide a Windows-version, filesystem, filter-driver, cloud-file, or side-effect qualification matrix for that exact combination.
    • It does not provide a broader guarantee that every reparse-point type or filter implementation will behave identically beyond the documented statement that normal reparse processing does not occur when FILE_OPEN_REPARSE_POINT is specified.

    On the reparse-point question specifically:

    • The documentation says that with FILE_OPEN_REPARSE_POINT, NtCreateFile attempts to directly open the reparse point file instead of performing normal reparse processing.
    • The broader reparse-point documentation also says that applications using CreateFile should specify FILE_FLAG_OPEN_REPARSE_POINT when opening a file if it is a reparse point, and that opening with the reparse-point flag can open the file or reparse point depending on use of that flag.
    • However, the documentation provided does not separately enumerate symbolic links, junctions, and mount points as a normative guarantee for this exact NtCreateFile user-mode relative-directory scenario.

    So the supported answer from the published material is:

    1. Relative opens via RootDirectory are documented.
    2. FILE_OPEN_REPARSE_POINT is documented to bypass normal reparse processing and attempt to open the reparse point itself.
    3. A directory handle returned by NtCreateFile can be reused as RootDirectory for later relative opens.
    4. The exact Windows 11 support statement requested for that precise directory-open combination, including all qualifications and guarantees, is not provided by the published documentation in scope.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.