Esempio n. 1
0
 private static void ValidateFlags(StartupInfoFlags flags)
 {
     if ((flags & StartupInfoFlags.UseHotKey) != 0 && (flags & StartupInfoFlags.UseSTDHandles) != 0)
     {
         throw new ArgumentException("Invalid flags combination");
     }
 }
Esempio n. 2
0
        internal StartupInfoW(StartupInfoFlags flags)
        {
            lpReserved      = null;
            lpDesktop       = null;
            lpTitle         = null;
            dwX             = 0;
            dwY             = 0;
            dwXSize         = 0;
            dwYSize         = 0;
            dwXCountChars   = 0;
            dwYCountChars   = 0;
            dwFillAttribute = 0;
            dwFlags         = flags;
            wShowWindow     = 0;
            cbReserved2     = 0;
            lpReserved2     = null;
            hStdInput       = default;
            hStdOutput      = default;
            hStdError       = default;

            ValidateFlags(flags);

            cb = (uint)sizeof(StartupInfoW);
        }
Esempio n. 3
0
        public static NativeProcess CreateProcess(string applicationName, string commandLine, CreateProcessFlags flags, StartupInfoFlags flags2, ProcThreadAttributeList atts, string currentDirectory, out NativeThread firstThread)
        {
            StartupInfoW startupInfo = new StartupInfoW(flags2);

            return(CreateProcess(applicationName, commandLine, flags, startupInfo, atts, currentDirectory, out firstThread));
        }