diff --git a/tools/tht/internal/safeio/private_root_windows.go b/tools/tht/internal/safeio/private_root_windows.go index abde8098..1d6d9af2 100644 --- a/tools/tht/internal/safeio/private_root_windows.go +++ b/tools/tht/internal/safeio/private_root_windows.go @@ -203,7 +203,11 @@ func openWindowsRelativeObjectWithShareMode( attributes, &status, &allocationSize, - windows.FILE_ATTRIBUTE_NORMAL, + // NtCreateFile expects zero here for the retained open/create contract. The + // Win32 FILE_ATTRIBUTE_NORMAL flag is not a valid NT FileAttributes value + // for this RootDirectory-relative call and produces STATUS_INVALID_PARAMETER + // on the Windows runner. + 0, shareMode, disposition, options,