[SETUPLIB][USETUP] Transform the existing ConcatPaths() function into a variadic function, and derive a CombinePaths() from it (plus their equivalent taking va_list).

This allows building concatenated paths with an arbitrary number of separated components.
- Use the newly-introduced CombinePaths() and ConcatPaths() functions.
- Fix also few comments, and place some UNICODE_NULLs here & there.

svn path=/branches/setup_improvements/; revision=74637
svn path=/branches/setup_improvements/; revision=74640
This commit is contained in:
Hermès Bélusca-Maïto 2017-05-23 22:30:54 +00:00
parent 92b99b865e
commit d27ef70aab
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
8 changed files with 201 additions and 167 deletions

View file

@ -16,10 +16,32 @@ IsValidPath(
#endif
NTSTATUS
ConcatPaths(
IN OUT PWSTR PathElem1,
ConcatPathsV(
IN OUT PWSTR PathBuffer,
IN SIZE_T cchPathSize,
IN PCWSTR PathElem2 OPTIONAL);
IN ULONG NumberOfPathComponents,
IN va_list PathComponentsList);
NTSTATUS
CombinePathsV(
OUT PWSTR PathBuffer,
IN SIZE_T cchPathSize,
IN ULONG NumberOfPathComponents,
IN va_list PathComponentsList);
NTSTATUS
ConcatPaths(
IN OUT PWSTR PathBuffer,
IN SIZE_T cchPathSize,
IN ULONG NumberOfPathComponents,
IN /* PCWSTR */ ...);
NTSTATUS
CombinePaths(
OUT PWSTR PathBuffer,
IN SIZE_T cchPathSize,
IN ULONG NumberOfPathComponents,
IN /* PCWSTR */ ...);
BOOLEAN
DoesPathExist(