The published documentation supports only part of that contract.
-
NtCreateFilesupports relative naming throughRootDirectory. WhenRootDirectoryis non-NULL,ObjectNameis interpreted relative to the directory represented by that handle. -
FILE_OPEN_REPARSE_POINTis documented forNtCreateFile: if that flag is specified and the target being opened has a reparse point, normal reparse processing does not occur andNtCreateFileattempts 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 thatRootDirectorycan be a handle to a directory obtained by a preceding call toNtCreateFile.
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_POINTand neitherFILE_DIRECTORY_FILEnorFILE_NON_DIRECTORY_FILEis 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_POINTis specified.
On the reparse-point question specifically:
- The documentation says that with
FILE_OPEN_REPARSE_POINT,NtCreateFileattempts to directly open the reparse point file instead of performing normal reparse processing. - The broader reparse-point documentation also says that applications using
CreateFileshould specifyFILE_FLAG_OPEN_REPARSE_POINTwhen 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
NtCreateFileuser-mode relative-directory scenario.
So the supported answer from the published material is:
- Relative opens via
RootDirectoryare documented. -
FILE_OPEN_REPARSE_POINTis documented to bypass normal reparse processing and attempt to open the reparse point itself. - A directory handle returned by
NtCreateFilecan be reused asRootDirectoryfor later relative opens. - 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: