[ros-diffs] [gvg] 20264: Detach GUI process from console

gvg at svn.reactos.com gvg at svn.reactos.com
Mon Dec 19 00:22:06 CET 2005


Detach GUI process from console
Modified: trunk/reactos/lib/kernel32/process/create.c
  _____  

Modified: trunk/reactos/lib/kernel32/process/create.c
--- trunk/reactos/lib/kernel32/process/create.c	2005-12-18 23:13:05 UTC
(rev 20263)
+++ trunk/reactos/lib/kernel32/process/create.c	2005-12-18 23:21:58 UTC
(rev 20264)
@@ -1107,6 +1107,13 @@

         SetLastError(ERROR_BAD_EXE_FORMAT);
         goto Cleanup;
     }
+    
+    if (IMAGE_SUBSYSTEM_WINDOWS_GUI == SectionImageInfo.SubsystemType)
+    {
+        /* Do not create a console for GUI applications */
+        dwCreationFlags &= ~CREATE_NEW_CONSOLE;
+        dwCreationFlags |= DETACHED_PROCESS;
+    }
 
     /* Initialize the process object attributes */
     ObjectAttributes =
BasepConvertObjectAttributes(&LocalObjectAttributes, 
@@ -1332,7 +1339,6 @@
         goto Cleanup;
     }
 
-    
     /* Notify CSRSS */
     Status = BasepNotifyCsrOfCreation(dwCreationFlags,
 
(HANDLE)ProcessBasicInfo.UniqueProcessId,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051219/56200e4e/attachment.html


More information about the Ros-diffs mailing list