Click or drag to resize
Xcalibur Systems LLC Logo

ProcessCreation Enumeration

The following process creation flags are used by the CreateProcess, CreateProcessAsUser, CreateProcessWithLogonW, and CreateProcessWithTokenW functions. They can be specified in any combination, except as noted.

Process Creation Flags


Namespace: Xcalibur.NativeMethods.V2.Processes
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[FlagsAttribute]
public enum ProcessCreation
Members
Member nameValueDescription
DebugProcess1 The calling thread starts and debugs the new process and all child processes created by the new process. It can receive all related debug events using the WaitForDebugEvent function. A process that uses becomes the root of a debugging chain. This continues until another process in the chain is created with . If this flag is combined with , the caller debugs only the new process, not any child processes.
DebugOnlyThisProcess2 The calling thread starts and debugs the new process. It can receive all related debug events using the WaitForDebugEvent function.
CreateSuspended4 The primary thread of the new process is created in a suspended state, and does not run until the ResumeThread function is called.
DetachedProcess8 For console processes, the new process does not inherit its parent's console (the default). The new process can call the AllocConsole function at a later time to create a console. For more information, see Creation of a Console. This value cannot be used with .
CreateNewConsole16 The new process has a new console, instead of inheriting its parent's console (the default). For more information, see Creation of a Console. This flag cannot be used with .
CreateNewProcessGroup512 The new process is the root process of a new process group. The process group includes all processes that are descendants of this root process. The process identifier of the new process group is the same as the process identifier, which is returned in the ProcessInformation parameter. Process groups are used by the GenerateConsoleCtrlEvent function to enable sending a CTRL+BREAK signal to a group of console processes. If this flag is specified, CTRL+C signals will be disabled for all processes within the new process group.
CreateUnicodeEnvironment1,024 If this flag is set, the environment block pointed to by lpEnvironment uses Unicode characters. Otherwise, the environment block uses ANSI characters.
CreateSeparateWowVdm2,048 This flag is valid only when starting a 16-bit Windows-based application. If set, the new process runs in a private Virtual DOS Machine (VDM). By default, all 16-bit Windows-based applications run as threads in a single, shared VDM. The advantage of running separately is that a crash only terminates the single VDM; any other programs running in distinct VDMs continue to function normally. Also, 16-bit Windows-based applications that are run in separate VDMs have separate input queues. That means that if one application stops responding momentarily, applications in separate VDMs continue to receive input. The disadvantage of running separately is that it takes significantly more memory to do so. You should use this flag only if the user requests that 16-bit applications should run in their own VDM.
CreateSharedWowVdm4,096 The flag is valid only when starting a 16-bit Windows-based application. If the DefaultSeparateVDM switch in the Windows section of WIN.INI is TRUE, this flag overrides the switch. The new process is run in the shared Virtual DOS Machine.
InheritParentAffinity65,536 The process inherits its parent's affinity. If the parent process has threads in more than one processor group, the new process inherits the group-relative affinity of an arbitrary group in use by the parent.
CreateProtectedProcess262,144 The process is to be run as a protected process. The system restricts access to protected processes and the threads of protected processes.
ExtendedStartupinfoPresent524,288 The process is created with extended startup information; the lpStartupInfo parameter specifies a STARTUPINFOEX structure.
CreateSecureProcess4,194,304 This flag allows secure processes, that run in the Virtualization-Based Security environment, to launch.
BreakawayFromJob16,777,216 The child processes of a process associated with a job are not associated with the job.
CreatePreserveCodeAuthzLevel33,554,432 Allows the caller to execute a child process that bypasses the process restrictions that would normally be applied automatically to the process.
DefaultErrorMode67,108,864 The new process does not inherit the error mode of the calling process. Instead, the new process gets the default error mode.
CreateNoWindow134,217,728 The process is a console application that is being run without a console window. Therefore, the console handle for the application is not set. This flag is ignored if the application is not a console application, or if it is used with either or .
See Also