private static void ValidateFlags(StartupInfoFlags flags) { if ((flags & StartupInfoFlags.UseHotKey) != 0 && (flags & StartupInfoFlags.UseSTDHandles) != 0) { throw new ArgumentException("Invalid flags combination"); } }
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); }
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)); }