From: Gé van Geldorp Date: Sun, 18 Dec 2005 23:21:58 +0000 (+0000) Subject: Detach GUI process from console X-Git-Tag: backups/expat-rbuild@40467~859 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=37b1fdddf80847139ccee775fb55012a1f5b85c3 Detach GUI process from console svn path=/trunk/; revision=20264 --- diff --git a/reactos/lib/kernel32/process/create.c b/reactos/lib/kernel32/process/create.c index f2a2ed896f4..14ca3809929 100644 --- a/reactos/lib/kernel32/process/create.c +++ b/reactos/lib/kernel32/process/create.c @@ -1107,6 +1107,13 @@ GetAppName: 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 @@ GetAppName: goto Cleanup; } - /* Notify CSRSS */ Status = BasepNotifyCsrOfCreation(dwCreationFlags, (HANDLE)ProcessBasicInfo.UniqueProcessId,