fixed the definition of RtlDosPathNameToNtPathName_U
Modified: trunk/reactos/include/ndk/rtlfuncs.h
Modified: trunk/reactos/lib/advapi32/reg/reg.c
Modified: trunk/reactos/lib/advapi32/sec/misc.c
Modified: trunk/reactos/lib/kernel32/file/cnotify.c
Modified: trunk/reactos/lib/kernel32/file/create.c
Modified: trunk/reactos/lib/kernel32/file/delete.c
Modified: trunk/reactos/lib/kernel32/file/dir.c
Modified: trunk/reactos/lib/kernel32/file/file.c
Modified: trunk/reactos/lib/kernel32/file/find.c
Modified: trunk/reactos/lib/kernel32/file/hardlink.c
Modified: trunk/reactos/lib/kernel32/file/mailslot.c
Modified: trunk/reactos/lib/kernel32/file/move.c
Modified: trunk/reactos/lib/kernel32/file/npipe.c
Modified: trunk/reactos/lib/kernel32/file/volume.c
Modified: trunk/reactos/lib/kernel32/misc/utils.c
Modified: trunk/reactos/lib/rtl/path.c
Modified: trunk/reactos/w32api/include/winternl.h

Modified: trunk/reactos/include/ndk/rtlfuncs.h
--- trunk/reactos/include/ndk/rtlfuncs.h	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/include/ndk/rtlfuncs.h	2005-12-17 15:45:59 UTC (rev 20224)
@@ -1639,10 +1639,10 @@
 BOOLEAN
 NTAPI
 RtlDosPathNameToNtPathName_U(
-    PWSTR DosName,
-    PUNICODE_STRING NtName,
-    PWSTR *ShortName,
-    PCURDIR CurrentDirectory
+    IN PCWSTR DosPathName,
+    OUT PUNICODE_STRING NtPathName,
+    OUT PCWSTR *NtFileNamePart,
+    OUT CURDIR *DirectoryInfo
 );
 
 NTSYSAPI

Modified: trunk/reactos/lib/advapi32/reg/reg.c
--- trunk/reactos/lib/advapi32/reg/reg.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/advapi32/reg/reg.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -2586,7 +2586,7 @@
       return RtlNtStatusToDosError (Status);
     }
 
-  if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpFile,
+  if (!RtlDosPathNameToNtPathName_U (lpFile,
 				     &FileName,
 				     NULL,
 				     NULL))
@@ -3858,7 +3858,7 @@
     }
 
   /* Convert new file name */
-  if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpNewFile,
+  if (!RtlDosPathNameToNtPathName_U (lpNewFile,
 				     &NewFileName,
 				     NULL,
 				     NULL))
@@ -3878,7 +3878,7 @@
 			      NULL);
 
   /* Convert old file name */
-  if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpOldFile,
+  if (!RtlDosPathNameToNtPathName_U (lpOldFile,
 				     &OldFileName,
 				     NULL,
 				     NULL))
@@ -3977,7 +3977,7 @@
       return RtlNtStatusToDosError (Status);
     }
 
-  if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpFile,
+  if (!RtlDosPathNameToNtPathName_U (lpFile,
 				     &FileName,
 				     NULL,
 				     NULL))
@@ -4070,7 +4070,7 @@
       return RtlNtStatusToDosError (Status);
     }
 
-  if (!RtlDosPathNameToNtPathName_U ((PWSTR)lpFile,
+  if (!RtlDosPathNameToNtPathName_U (lpFile,
 				     &FileName,
 				     NULL,
 				     NULL))

Modified: trunk/reactos/lib/advapi32/sec/misc.c
--- trunk/reactos/lib/advapi32/sec/misc.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/advapi32/sec/misc.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -221,7 +221,7 @@
       AccessMask |= ACCESS_SYSTEM_SECURITY;
     }
 
-  if (!RtlDosPathNameToNtPathName_U((LPWSTR)lpFileName,
+  if (!RtlDosPathNameToNtPathName_U(lpFileName,
 				    &FileName,
 				    NULL,
 				    NULL))
@@ -365,7 +365,7 @@
       AccessMask |= ACCESS_SYSTEM_SECURITY;
     }
 
-  if (!RtlDosPathNameToNtPathName_U((LPWSTR)lpFileName,
+  if (!RtlDosPathNameToNtPathName_U(lpFileName,
 				    &FileName,
 				    NULL,
 				    NULL))

Modified: trunk/reactos/lib/kernel32/file/cnotify.c
--- trunk/reactos/lib/kernel32/file/cnotify.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/cnotify.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -70,7 +70,7 @@
    OBJECT_ATTRIBUTES ObjectAttributes;
    HANDLE hDir;
 
-   if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpPathName,
+   if (!RtlDosPathNameToNtPathName_U (lpPathName,
                                           &NtPathU,
                                           NULL,
                                           NULL))

Modified: trunk/reactos/lib/kernel32/file/create.c
--- trunk/reactos/lib/kernel32/file/create.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/create.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -105,7 +105,7 @@
      }
 
    /* validate & translate the filename */
-   if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpFileName,
+   if (!RtlDosPathNameToNtPathName_U (lpFileName,
 				      &NtPathU,
 				      NULL,
 				      NULL))
@@ -437,7 +437,7 @@
     case DEVICE_PATH:
     case UNC_DOT_PATH:
     default:
-        if(!RtlDosPathNameToNtPathName_U((LPWSTR)lpTargetFileName, &TargetFileName, NULL, NULL))
+        if(!RtlDosPathNameToNtPathName_U(lpTargetFileName, &TargetFileName, NULL, NULL))
         {
             dwErr = ERROR_INVALID_PARAMETER;
             goto Cleanup;
@@ -475,7 +475,7 @@
     if(bRelativePath)
         pReparseData->SymbolicLinkReparseBuffer.Flags |= 1; // TODO! give this lone flag a name
 
-    if(!RtlDosPathNameToNtPathName_U((LPWSTR)lpSymlinkFileName, &SymlinkFileName, NULL, NULL))
+    if(!RtlDosPathNameToNtPathName_U(lpSymlinkFileName, &SymlinkFileName, NULL, NULL))
     {
         dwErr = ERROR_PATH_NOT_FOUND;
         goto Cleanup;

Modified: trunk/reactos/lib/kernel32/file/delete.c
--- trunk/reactos/lib/kernel32/file/delete.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/delete.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -55,7 +55,7 @@
 
 	DPRINT("DeleteFileW (lpFileName %S)\n",lpFileName);
 
-	if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpFileName,
+	if (!RtlDosPathNameToNtPathName_U (lpFileName,
 	                                   &NtPathU,
 	                                   NULL,
 	                                   NULL))

Modified: trunk/reactos/lib/kernel32/file/dir.c
--- trunk/reactos/lib/kernel32/file/dir.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/dir.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -100,7 +100,7 @@
         DPRINT ("lpPathName %S lpSecurityAttributes %p\n",
                 lpPathName, lpSecurityAttributes);
 
-        if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpPathName,
+        if (!RtlDosPathNameToNtPathName_U (lpPathName,
                                            &NtPathU,
                                            NULL,
                                            NULL))
@@ -182,7 +182,7 @@
          * Translate the template directory path
          */
 
-        if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpTemplateDirectory,
+        if (!RtlDosPathNameToNtPathName_U (lpTemplateDirectory,
                                            &NtTemplatePathU,
                                            NULL,
                                            NULL))
@@ -239,7 +239,7 @@
          * Translate the new directory path and check if they're the same
          */
         
-        if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpNewDirectory,
+        if (!RtlDosPathNameToNtPathName_U (lpNewDirectory,
                                            &NtPathU,
                                            NULL,
                                            NULL))
@@ -526,7 +526,7 @@
 
         DPRINT("lpPathName %S\n", lpPathName);
 
-        if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpPathName,
+        if (!RtlDosPathNameToNtPathName_U (lpPathName,
                                            &NtPathU,
                                            NULL,
                                            NULL))

Modified: trunk/reactos/lib/kernel32/file/file.c
--- trunk/reactos/lib/kernel32/file/file.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/file.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -296,7 +296,7 @@
 	else
 		RtlUnicodeStringToOemString (&FileName, &FileNameU, FALSE);
 
-	if (!RtlDosPathNameToNtPathName_U ((LPWSTR)PathNameW,
+	if (!RtlDosPathNameToNtPathName_U (PathNameW,
 					   &FileNameString,
 					   NULL,
 					   NULL))
@@ -849,7 +849,7 @@
   }
 
   /* Validate and translate the filename */
-  if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpFileName,
+  if (!RtlDosPathNameToNtPathName_U (lpFileName,
 				     &FileName,
 				     NULL,
 				     NULL))
@@ -1061,7 +1061,7 @@
   DPRINT ("SetFileAttributeW(%S, 0x%lx) called\n", lpFileName, dwFileAttributes);
 
   /* Validate and translate the filename */
-  if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpFileName,
+  if (!RtlDosPathNameToNtPathName_U (lpFileName,
 				     &FileName,
 				     NULL,
 				     NULL))

Modified: trunk/reactos/lib/kernel32/file/find.c
--- trunk/reactos/lib/kernel32/file/find.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/find.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -279,7 +279,7 @@
 	   SearchPath[Length] = 0;
 	}
 
-	bResult = RtlDosPathNameToNtPathName_U ((LPWSTR)SearchPath,
+	bResult = RtlDosPathNameToNtPathName_U (SearchPath,
 	                                        &NtPathU,
 	                                        NULL,
 	                                        NULL);

Modified: trunk/reactos/lib/kernel32/file/hardlink.c
--- trunk/reactos/lib/kernel32/file/hardlink.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/hardlink.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -51,7 +51,7 @@
     return FALSE;
   }
 
-  if(RtlDosPathNameToNtPathName_U((LPWSTR)lpExistingFileName, &LinkTarget, NULL, NULL))
+  if(RtlDosPathNameToNtPathName_U(lpExistingFileName, &LinkTarget, NULL, NULL))
   {
     ULONG NeededSize = RtlGetFullPathName_U((LPWSTR)lpExistingFileName, 0, NULL, NULL);
     if(NeededSize > 0)
@@ -108,7 +108,7 @@
                                     FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_FOR_BACKUP_INTENT | FILE_OPEN_REPARSE_POINT);
                 if(NT_SUCCESS(Status))
                 {
-                  if(RtlDosPathNameToNtPathName_U((LPWSTR)lpFileName, &LinkName, NULL, NULL))
+                  if(RtlDosPathNameToNtPathName_U(lpFileName, &LinkName, NULL, NULL))
                   {
                     NeededSize = sizeof(FILE_LINK_INFORMATION) + LinkName.Length + sizeof(WCHAR);
                     LinkInformation = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, NeededSize);

Modified: trunk/reactos/lib/kernel32/file/mailslot.c
--- trunk/reactos/lib/kernel32/file/mailslot.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/mailslot.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -63,7 +63,7 @@
    ULONG Attributes = OBJ_CASE_INSENSITIVE;
    PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
 
-   Result = RtlDosPathNameToNtPathName_U((LPWSTR)lpName,
+   Result = RtlDosPathNameToNtPathName_U(lpName,
 					 &MailslotName,
 					 NULL,
 					 NULL);

Modified: trunk/reactos/lib/kernel32/file/move.c
--- trunk/reactos/lib/kernel32/file/move.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/move.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -91,13 +91,13 @@
 
     DPRINT("Add support to smss for keys created by MOVEFILE_DELAY_UNTIL_REBOOT\n");
 
-    if (!RtlDosPathNameToNtPathName_U( (LPWSTR)source, &source_name, NULL, NULL ))
+    if (!RtlDosPathNameToNtPathName_U( source, &source_name, NULL, NULL ))
     {
         SetLastError( ERROR_PATH_NOT_FOUND );
         return FALSE;
     }
     dest_name.Buffer = NULL;
-    if (dest && !RtlDosPathNameToNtPathName_U( (LPWSTR)dest, &dest_name, NULL, NULL ))
+    if (dest && !RtlDosPathNameToNtPathName_U( dest, &dest_name, NULL, NULL ))
     {
         RtlFreeUnicodeString( &source_name );
         SetLastError( ERROR_PATH_NOT_FOUND );
@@ -224,7 +224,7 @@
 
 	
         /* validate & translate the filename */
-        if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpNewFileName,
+        if (!RtlDosPathNameToNtPathName_U (lpNewFileName,
 				           &DstPathU,
 				           NULL,
 				           NULL))

Modified: trunk/reactos/lib/kernel32/file/npipe.c
--- trunk/reactos/lib/kernel32/file/npipe.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/npipe.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -90,7 +90,7 @@
     if (nMaxInstances == PIPE_UNLIMITED_INSTANCES) nMaxInstances = -1;
 
     /* Convert the name */
-    Result = RtlDosPathNameToNtPathName_U((LPWSTR)lpName,
+    Result = RtlDosPathNameToNtPathName_U(lpName,
                                            &NamedPipeName,
                                            NULL,
                                            NULL);
@@ -464,7 +464,7 @@
    HANDLE FileHandle;
    IO_STATUS_BLOCK Iosb;
 
-   r = RtlDosPathNameToNtPathName_U((LPWSTR)lpNamedPipeName,
+   r = RtlDosPathNameToNtPathName_U(lpNamedPipeName,
 				    &NamedPipeName,
 				    NULL,
 				    NULL);

Modified: trunk/reactos/lib/kernel32/file/volume.c
--- trunk/reactos/lib/kernel32/file/volume.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/file/volume.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -38,7 +38,7 @@
   IO_STATUS_BLOCK IoStatusBlock;
   HANDLE hFile;
 
-  if (!RtlDosPathNameToNtPathName_U((LPWSTR)DirName,
+  if (!RtlDosPathNameToNtPathName_U(DirName,
 				    &NtPathU,
 				    NULL,
 				    NULL))

Modified: trunk/reactos/lib/kernel32/misc/utils.c
--- trunk/reactos/lib/kernel32/misc/utils.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/kernel32/misc/utils.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -412,7 +412,7 @@
     RelativeName.Handle = NULL;
 
     /* Find the application name */
-    RtlDosPathNameToNtPathName_U((LPWSTR)lpApplicationName,
+    RtlDosPathNameToNtPathName_U(lpApplicationName,
                                  ApplicationName,
                                  NULL,
                                  &RelativeName);

Modified: trunk/reactos/lib/rtl/path.c
--- trunk/reactos/lib/rtl/path.c	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/lib/rtl/path.c	2005-12-17 15:45:59 UTC (rev 20224)
@@ -675,10 +675,10 @@
  * @implemented
  */
 BOOLEAN NTAPI
-RtlDosPathNameToNtPathName_U(PWSTR dosname,
-			     PUNICODE_STRING ntname,
-			     PWSTR *FilePart,
-			     PCURDIR nah)
+RtlDosPathNameToNtPathName_U(IN PCWSTR DosPathName,
+			     OUT PUNICODE_STRING NtPathName,
+			     OUT PCWSTR *NtFileNamePart,
+			     OUT CURDIR *DirectoryInfo)
 {
 	UNICODE_STRING  us;
 	PCURDIR cd;
@@ -693,7 +693,7 @@
 
 	RtlAcquirePebLock ();
 
-	RtlInitUnicodeString (&us, dosname);
+	RtlInitUnicodeString (&us, DosPathName);
 	if (us.Length > 8)
 	{
 		Buffer = us.Buffer;
@@ -721,10 +721,10 @@
 		return FALSE;
 	}
 
-	Size = RtlGetFullPathName_U (dosname,
+	Size = RtlGetFullPathName_U (DosPathName,
 	                             sizeof(fullname),
 	                             fullname,
-	                             FilePart);
+	                             (PWSTR*)NtFileNamePart);
 	if (Size == 0 || Size > MAX_PATH * sizeof(WCHAR))
 	{
 		RtlFreeHeap (RtlGetProcessHeap (),
@@ -763,18 +763,18 @@
 	}
 
 	/* set NT filename */
-	ntname->Length        = Length * sizeof(WCHAR);
-	ntname->MaximumLength = sizeof(fullname) + MAX_PFX_SIZE;
-	ntname->Buffer        = Buffer;
+	NtPathName->Length        = Length * sizeof(WCHAR);
+	NtPathName->MaximumLength = sizeof(fullname) + MAX_PFX_SIZE;
+	NtPathName->Buffer        = Buffer;
 
 	/* set pointer to file part if possible */
-	if (FilePart && *FilePart)
-		*FilePart = Buffer + Length - wcslen (*FilePart);
+	if (NtFileNamePart && *NtFileNamePart)
+		*NtFileNamePart = Buffer + Length - wcslen (*NtFileNamePart);
 
 	/* Set name and handle structure if possible */
-	if (nah)
+	if (DirectoryInfo)
 	{
-		memset (nah, 0, sizeof(CURDIR));
+		memset (DirectoryInfo, 0, sizeof(CURDIR));
 		cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectory.DosPath);
 		if (Type == 5 && cd->Handle)
 		{
@@ -782,10 +782,10 @@
 		    if (RtlEqualUnicodeString(&us, &cd->DosPath, TRUE))
 		    {
 			Length = ((cd->DosPath.Length / sizeof(WCHAR)) - Offset) + ((Type == 1) ? 8 : 4);
-			nah->DosPath.Buffer = Buffer + Length;
-			nah->DosPath.Length = ntname->Length - (Length * sizeof(WCHAR));
-			nah->DosPath.MaximumLength = nah->DosPath.Length;
-			nah->Handle = cd->Handle;
+			DirectoryInfo->DosPath.Buffer = Buffer + Length;
+			DirectoryInfo->DosPath.Length = NtPathName->Length - (Length * sizeof(WCHAR));
+			DirectoryInfo->DosPath.MaximumLength = DirectoryInfo->DosPath.Length;
+			DirectoryInfo->Handle = cd->Handle;
 		    }
 		}
 	}

Modified: trunk/reactos/w32api/include/winternl.h
--- trunk/reactos/w32api/include/winternl.h	2005-12-17 12:23:41 UTC (rev 20223)
+++ trunk/reactos/w32api/include/winternl.h	2005-12-17 15:45:59 UTC (rev 20224)
@@ -1965,7 +1965,7 @@
 NTSTATUS  WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
 DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR);
 BOOLEAN   WINAPI RtlDoesFileExists_U(LPCWSTR);
-BOOLEAN   WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
+BOOLEAN   WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PCWSTR*,CURDIR*);
 ULONG     WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
 WCHAR     WINAPI RtlDowncaseUnicodeChar(WCHAR);
 NTSTATUS  WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);