[ros-diffs] [dchapyshev] 41402: - Fix 5 winetests for CreateProcessA/W

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Sat Jun 13 14:24:52 CEST 2009


Author: dchapyshev
Date: Sat Jun 13 16:24:51 2009
New Revision: 41402

URL: http://svn.reactos.org/svn/reactos?rev=41402&view=rev
Log:
- Fix 5 winetests for CreateProcessA/W

Modified:
    trunk/reactos/dll/win32/kernel32/misc/utils.c
    trunk/reactos/dll/win32/kernel32/process/procsup.c

Modified: trunk/reactos/dll/win32/kernel32/misc/utils.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/utils.c?rev=41402&r1=41401&r2=41402&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/utils.c [iso-8859-1] Sat Jun 13 16:24:51 2009
@@ -412,10 +412,14 @@
     RelativeName.Handle = NULL;
 
     /* Find the application name */
-    RtlDosPathNameToNtPathName_U(lpApplicationName,
-                                 ApplicationName,
-                                 NULL,
-                                 &RelativeName);
+    if (!RtlDosPathNameToNtPathName_U(lpApplicationName,
+                                      ApplicationName,
+                                      NULL,
+                                      &RelativeName))
+    {
+        return STATUS_OBJECT_PATH_NOT_FOUND;
+    }
+
     DPRINT("ApplicationName %wZ\n", ApplicationName);
     DPRINT("RelativeName %wZ\n", &RelativeName.DosPath);
     
@@ -442,7 +446,7 @@
     if (!NT_SUCCESS(Status))
     {
         DPRINT1("Failed to open file\n");
-        SetLastErrorByStatus (Status);
+        SetLastErrorByStatus(Status);
         return Status;
     }
     

Modified: trunk/reactos/dll/win32/kernel32/process/procsup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/process/procsup.c?rev=41402&r1=41401&r2=41402&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/process/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/process/procsup.c [iso-8859-1] Sat Jun 13 16:24:51 2009
@@ -1072,6 +1072,11 @@
                                       &StartupInfo,
                                       lpProcessInformation);
 
+            case STATUS_OBJECT_NAME_NOT_FOUND:
+            case STATUS_OBJECT_PATH_NOT_FOUND:
+                SetLastErrorByStatus(Status);
+                goto Cleanup;
+
             default:
                 /* Invalid Image Type */
                 SetLastError(ERROR_BAD_EXE_FORMAT);



More information about the Ros-diffs mailing list