Author: ion
Date: Mon Jul 11 00:38:34 2011
New Revision: 52623
URL:
http://svn.reactos.org/svn/reactos?rev=52623&view=rev
Log:
[RTL]: Clarify what RtlGetLongestNtPathLength returns instead of using "+9" as a
magic constant.
Modified:
trunk/reactos/lib/rtl/path.c
Modified: trunk/reactos/lib/rtl/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=52623&a…
==============================================================================
--- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Mon Jul 11 00:38:34 2011
@@ -28,6 +28,8 @@
static const UNICODE_STRING _condev = RTL_CONSTANT_STRING(L"\\\\.\\CON");
+static const UNICODE_STRING _unc = RTL_CONSTANT_STRING(L"\\??\\UNC\\");
+
static const UNICODE_STRING _lpt = RTL_CONSTANT_STRING(L"LPT");
static const UNICODE_STRING _com = RTL_CONSTANT_STRING(L"COM");
@@ -46,9 +48,17 @@
/*
* @implemented
*/
-ULONG NTAPI RtlGetLongestNtPathLength (VOID)
-{
- return (MAX_PATH + 9);
+ULONG
+NTAPI
+RtlGetLongestNtPathLength(VOID)
+{
+ /*
+ * The longest NT path is a DOS path that actually sits on a UNC path (ie:
+ * a mapped network drive), which is accessed through the DOS Global?? path.
+ * This is, and has always been equal to, 269 characters, except in Wine
+ * which claims this is 277. Go figure.
+ */
+ return (MAX_PATH + _unc.Length + sizeof(ANSI_NULL));
}