The public documentation does not settle all seven points, so below I separate what it states from what I observed in testing. All tests ran on Windows 11 Pro build 26300.9457 (x64), with Windows SDK 10.0.26100.0 and a native program on local NTFS.
The CreateDirectory2A reference documents INVALID_HANDLE_VALUE on failure. In separate tests on the same configuration, all 12,597 failed calls returned INVALID_HANDLE_VALUE and none returned NULL. The 724 failures in the runs for this question did the same, and in each of them GetLastError read immediately after the call returned a specific error code. Until the W page is corrected, checking both values is the safer option:
HANDLE h = CreateDirectory2W(path, access, share, flags, &sa);
if (h == NULL || h == INVALID_HANDLE_VALUE) {
DWORD error = GetLastError();
// handle error; do not call CloseHandle
}
The SDK's fileapi.h declares the function as WINBASEAPI HANDLE WINAPI with five parameters, and WINAPI expands to __stdcall. The sixth argument in the W page example does not match this declaration.
When the destination already exists, the W page lists only ERROR_ALREADY_EXISTS and ERROR_PATH_NOT_FOUND. I tested an existing directory, a regular file, file and directory symbolic links (including ones whose targets did not exist), a junction and a volume mount point. Across 640 calls with DIRECTORY_FLAGS_DISALLOW_PATH_REDIRECTS both set and cleared, every call failed with 183. The existing objects and link targets were unchanged afterward.
Regarding creation-time security, the W page says lpSecurityDescriptor specifies the security descriptor for the new directory, but it does not state an atomicity guarantee. I passed O:BAD:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA) under a parent that granted Everyone full control through an inheritable ACE. Every successful call showed owner Administrators, only the two specified ACEs, and SE_DACL_PROTECTED set. A concurrent observer with a limited token tried to open 8,000 new directories 2,452,904 times and never succeeded. The same observer reached 400 of 400 control directories that had inherited access for a short time. I found no intermediate state, but this is not proof of atomicity.
Whether Administrators can be the owner depends on the token. The TOKEN_GROUPS reference says a group SID with SE_GROUP_OWNER can be assigned as the owner of objects. In the elevated admin token I tested, Administrators had this attribute, and owner Administrators succeeded with no extra privileges enabled. In a simulated limited token, where Administrators is deny-only, the same request failed with ERROR_INVALID_OWNER (1307). That token could not enable SeRestorePrivilege because it did not hold it, which matches AdjustTokenPrivileges. Failed calls did not leave a directory behind.
DIRECTORY_FLAGS_DISALLOW_PATH_REDIRECTS behaved differently depending on where the link was. In separate tests on a stable path, it blocked symbolic links, junctions and mount points in intermediate path components with error 4395, not ERROR_PATH_REDIRECTED. For a link at the final component itself, the call failed with 183 rather than 4395 in every case, with the flag set or cleared. When a parent component was swapped concurrently, though, 14 of 8,000 calls failed with 4395 and still created the directory at the redirected destination. A failed call is therefore not evidence that nothing was created elsewhere.
As for the returned handle, every successful handle matched the created directory by volume serial number and file ID. In my runs, the handle was opened with FILE_LIST_DIRECTORY | FILE_READ_ATTRIBUTES | READ_CONTROL | SYNCHRONIZE, plus WRITE_DAC in the concurrency runs, and the owner and DACL could be read through it. I did not test each right on its own, so this is a working set rather than the minimum. As the W page notes, omitting FILE_SHARE_DELETE blocks both delete and rename by others while the handle is open. With the flag set, any share mode that included FILE_SHARE_WRITE failed with error 87. Close the handle once with CloseHandle, and only after a successful call.
The documented minimums are Windows 11 24H2 and Windows Server 2025, and the declaration is only available when NTDDI_VERSION >= NTDDI_WIN11_GE. The W page lists SMB 3.0, CsvFS and ReFS as supported technologies, but my results only cover local NTFS on x64 and do not include a real UAC filtered token.
What I have shared above is what I could find in Microsoft's public documentation, together with what I observed in my own tests. These results describe behavior on one configuration, not the API contract you are asking for. For a formal confirmation, Windows Developer Support is the channel that is suitable for you.
I hope these results help with your review. If they turn out to be useful, you may consider following this guide so that others with the same question can find them more easily.
Thank you.