public static extern bool CreateProcess(string applicationPath, string commandLine, IntPtr processSecurityAttributes, IntPtr threadSecurityAttributes, bool inheritHandles, Win32ProcessCreationFlags creationFlags, IntPtr environment, string currentDirectory, ref Win32StartupInfo startupInfo, out Win32ProcessInformation processInformation);
private SuspendedProcess(Win32ProcessInformation processInformation, bool resumeOnDispose) { this.IsSuspended = true; // Suspended by default this.processHandle = new Win32ProcessSafeHandle(processInformation.ProcessHandle); this.threadHandle = new Win32ThreadSafeHandle(processInformation.ThreadHandle); this.ProcessId = processInformation.ProcessId; this.ThreadId = processInformation.ThreadId; this.resumeOnDispose = resumeOnDispose; }