Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

CREATE_PROCESS_FLAGS (advapi32)
 
.

The following enum (Create Process Flags) can be used by CreateProcess, CreateProcessAsUser, CreateProcessWithLogonW, and CreateProcessWithTokenW.

C# Signature:

    [Flags]
    enum CreateProcessFlags
    {
        CREATE_BREAKAWAY_FROM_JOB = 0x01000000,
        CREATE_DEFAULT_ERROR_MODE = 0x04000000,
        CREATE_NEW_CONSOLE = 0x00000010,
        CREATE_NEW_PROCESS_GROUP = 0x00000200,
        CREATE_NO_WINDOW = 0x08000000,
        CREATE_PROTECTED_PROCESS = 0x00040000,
        CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000,
        CREATE_SEPARATE_WOW_VDM = 0x00000800,
        CREATE_SHARED_WOW_VDM = 0x00001000,
        CREATE_SUSPENDED = 0x00000004,
        CREATE_UNICODE_ENVIRONMENT = 0x00000400,
        DEBUG_ONLY_THIS_PROCESS = 0x00000002,
        DEBUG_PROCESS = 0x00000001,
        DETACHED_PROCESS = 0x00000008,
        EXTENDED_STARTUPINFO_PRESENT = 0x00080000,
        INHERIT_PARENT_AFFINITY = 0x00010000
    }

Expanded C# Signature:

    [Flags]
    enum CreateProcessFlags : uint
    {
        DEBUG_PROCESS               = 0x00000001,
        DEBUG_ONLY_THIS_PROCESS         = 0x00000002,
        CREATE_SUSPENDED            = 0x00000004,
        DETACHED_PROCESS            = 0x00000008,
        CREATE_NEW_CONSOLE          = 0x00000010,
        NORMAL_PRIORITY_CLASS           = 0x00000020,
        IDLE_PRIORITY_CLASS         = 0x00000040,
        HIGH_PRIORITY_CLASS         = 0x00000080,
        REALTIME_PRIORITY_CLASS         = 0x00000100,
        CREATE_NEW_PROCESS_GROUP        = 0x00000200,
        CREATE_UNICODE_ENVIRONMENT      = 0x00000400,
        CREATE_SEPARATE_WOW_VDM         = 0x00000800,
        CREATE_SHARED_WOW_VDM           = 0x00001000,
        CREATE_FORCEDOS             = 0x00002000,
        BELOW_NORMAL_PRIORITY_CLASS     = 0x00004000,
        ABOVE_NORMAL_PRIORITY_CLASS     = 0x00008000,
        INHERIT_PARENT_AFFINITY         = 0x00010000,
        INHERIT_CALLER_PRIORITY         = 0x00020000,
        CREATE_PROTECTED_PROCESS        = 0x00040000,
        EXTENDED_STARTUPINFO_PRESENT    = 0x00080000,
        PROCESS_MODE_BACKGROUND_BEGIN       = 0x00100000,
        PROCESS_MODE_BACKGROUND_END     = 0x00200000,
        CREATE_BREAKAWAY_FROM_JOB       = 0x01000000,
        CREATE_PRESERVE_CODE_AUTHZ_LEVEL    = 0x02000000,
        CREATE_DEFAULT_ERROR_MODE       = 0x04000000,
        CREATE_NO_WINDOW            = 0x08000000,
        PROFILE_USER            = 0x10000000,
        PROFILE_KERNEL              = 0x20000000,
        PROFILE_SERVER              = 0x40000000,
        CREATE_IGNORE_SYSTEM_DEFAULT    = 0x80000000,
    }

Expanded VB.NET Signature

    <Flags()> _
    Enum CreateProcessFlags
    DEBUG_PROCESS = 1
    DEBUG_ONLY_THIS_PROCESS = 2
    CREATE_SUSPENDED = 4
    DETACHED_PROCESS = 8
    CREATE_NEW_CONSOLE = 10
    NORMAL_PRIORITY_CLASS = 20
    IDLE_PRIORITY_CLASS = 40
    HIGH_PRIORITY_CLASS = 80
    REALTIME_PRIORITY_CLASS = 100
    CREATE_NEW_PROCESS_GROUP = 200
    CREATE_UNICODE_ENVIRONMENT = 400
    CREATE_SEPARATE_WOW_VDM = 800
    CREATE_SHARED_WOW_VDM = 1000
    CREATE_FORCEDOS = 2000
    BELOW_NORMAL_PRIORITY_CLASS = 4000
    ABOVE_NORMAL_PRIORITY_CLASS = 8000
    INHERIT_PARENT_AFFINITY = 10000
    INHERIT_CALLER_PRIORITY = 20000
    CREATE_PROTECTED_PROCESS = 40000
    EXTENDED_STARTUPINFO_PRESENT = 80000
    PROCESS_MODE_BACKGROUND_BEGIN = 100000
    PROCESS_MODE_BACKGROUND_END = 200000
    CREATE_BREAKAWAY_FROM_JOB = 1000000
    CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 2000000
    CREATE_DEFAULT_ERROR_MODE = 4000000
    CREATE_NO_WINDOW = 8000000
    PROFILE_USER = 10000000
    PROFILE_KERNEL = 20000000
    PROFILE_SERVER = 40000000
    CREATE_IGNORE_SYSTEM_DEFAULT = 80000000
    End Enum

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation
CREATE_PROCESS_FLAGS on MSDN; Expanded Signature: Winbase.h

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions