mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:23:05 +00:00
Detach GUI process from console
svn path=/trunk/; revision=20264
This commit is contained in:
parent
b414f7c09f
commit
37b1fdddf8
1 changed files with 7 additions and 1 deletions
|
@ -1107,6 +1107,13 @@ GetAppName:
|
||||||
SetLastError(ERROR_BAD_EXE_FORMAT);
|
SetLastError(ERROR_BAD_EXE_FORMAT);
|
||||||
goto Cleanup;
|
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 */
|
/* Initialize the process object attributes */
|
||||||
ObjectAttributes = BasepConvertObjectAttributes(&LocalObjectAttributes,
|
ObjectAttributes = BasepConvertObjectAttributes(&LocalObjectAttributes,
|
||||||
|
@ -1332,7 +1339,6 @@ GetAppName:
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Notify CSRSS */
|
/* Notify CSRSS */
|
||||||
Status = BasepNotifyCsrOfCreation(dwCreationFlags,
|
Status = BasepNotifyCsrOfCreation(dwCreationFlags,
|
||||||
(HANDLE)ProcessBasicInfo.UniqueProcessId,
|
(HANDLE)ProcessBasicInfo.UniqueProcessId,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue