Hi @immobiliare savelli ,
The public documentation covers some of what you need, mainly FILE_CREATE and share access. It does not establish OBJ_DONT_REPARSE as a user-mode NtCreateFile contract, so those guarantees would need to come from the Windows team.
On OBJ_DONT_REPARSE, the fail-on-reparse behavior is described only in the kernel-mode OBJECT_ATTRIBUTES reference. The user-mode NtCreateFile page lists only zero or OBJ_CASE_INSENSITIVE for Attributes. Because of that, I could not find a documented guarantee for this combination that covers junctions, symbolic links, or other reparse tags.
As for creation ordering, the same NtCreateFile page documents three points. FILE_CREATE fails if the name already exists and does not open the existing object. FILE_DIRECTORY_FILE fails if the target is not a directory. A security descriptor supplied in ObjectAttributes is applied at creation. What the page does not cover is when reparse processing happens relative to on-disk changes, or any restrictions by Windows version, file system, filter driver, or security context.
To protect the new directory through the original handle, the documented option is ShareAccess = 0, or at minimum omitting FILE_SHARE_DELETE. Combine it with directory rights such as READ_CONTROL | FILE_LIST_DIRECTORY | SYNCHRONIZE. With no share flags, other opens fail while your handle remains open. Without FILE_SHARE_DELETE, no other caller can obtain delete access, and rename requires that access, as described in CreateFileW and FILE_RENAME_INFORMATION. This protection applies to the directory itself. It is not documented to prevent a rename or move of its parent.
If you need an authoritative confirmation before deployment, you can open a case through Windows Developer Support. Including your target Windows builds, file systems, and filter-driver environment will help the team address each point directly.
If you feel the information has helped you move forward, you are welcome to follow this guide when convenient. You are also always welcome to add any confirmation you receive here.
Thank you.