https://git.reactos.org/?p=reactos.git;a=commitdiff;h=04c851194c0179010b81d…
commit 04c851194c0179010b81d367658e5022cf1095c3
Author: Andrew Boyarshin <andrew.boyarshin(a)gmail.com>
AuthorDate: Mon Nov 26 19:50:40 2018 +0700
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Jan 5 13:33:28 2019 +0100
[NTDLL][RTL] Implement RtlGetFullPathName_UEx
---
sdk/lib/rtl/path.c | 42 +++++++++++++++++++++++++++++++++---------
1 file changed, 33 insertions(+), 9 deletions(-)
diff --git a/sdk/lib/rtl/path.c b/sdk/lib/rtl/path.c
index 7639424d0a..4ac9ba78aa 100644
--- a/sdk/lib/rtl/path.c
+++ b/sdk/lib/rtl/path.c
@@ -1672,6 +1672,37 @@ Leave:
return Status;
}
+/*
+ * @implemented
+ */
+ULONG
+NTAPI
+RtlGetFullPathName_UEx(
+ _In_ PWSTR FileName,
+ _In_ ULONG BufferLength,
+ _Out_writes_bytes_(BufferLength) PWSTR Buffer,
+ _Out_opt_ PWSTR *FilePart,
+ _Out_opt_ RTL_PATH_TYPE *InputPathType)
+{
+ UNICODE_STRING FileNameString;
+ NTSTATUS status;
+
+ if (InputPathType)
+ *InputPathType = 0;
+
+ /* Build the string */
+ status = RtlInitUnicodeStringEx(&FileNameString, FileName);
+ if (!NT_SUCCESS(status)) return 0;
+
+ /* Call the extended function */
+ return RtlGetFullPathName_Ustr(
+ &FileNameString,
+ BufferLength,
+ Buffer,
+ (PCWSTR*)FilePart,
+ NULL,
+ InputPathType);
+}
/******************************************************************
* RtlGetFullPathName_U (NTDLL.@)
@@ -1697,20 +1728,13 @@ RtlGetFullPathName_U(
_Out_z_bytecap_(Size) PWSTR Buffer,
_Out_opt_ PWSTR *ShortName)
{
- NTSTATUS Status;
- UNICODE_STRING FileNameString;
RTL_PATH_TYPE PathType;
- /* Build the string */
- Status = RtlInitUnicodeStringEx(&FileNameString, FileName);
- if (!NT_SUCCESS(Status)) return 0;
-
/* Call the extended function */
- return RtlGetFullPathName_Ustr(&FileNameString,
+ return RtlGetFullPathName_UEx((PWSTR)FileName,
Size,
Buffer,
- (PCWSTR*)ShortName,
- NULL,
+ ShortName,
&PathType);
}