Пример #1
0
        public static NativeProcess CreateProcess(string applicationName, string commandLine, CreateProcessFlags flags, StartupInfoW startupInfo, ProcThreadAttributeList atts, string currentDirectory, out NativeThread firstThread)
        {
            if ((flags & ~SupportedCreateProcessFlags) != 0)
            {
                throw new ArgumentException("Unsupported CreateProcessFlags given!");
            }
            if ((startupInfo.dwFlags & ~SupportedStartupInfoFlags) != 0)
            {
                throw new ArgumentException("Unsupported StartupInfoFlags given");
            }
            if (atts.IsDisposed)
            {
                throw new ObjectDisposedException("Atts");
            }

            StartupInfoExW startupInfoEx = new StartupInfoExW(startupInfo, atts);

            flags |= CreateProcessFlags.ExtendedStartupInfoPresent;

            return(CreateProcessInternal(applicationName, commandLine, flags, startupInfoEx, currentDirectory, out firstThread));
        }
Пример #2
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));
        }