auto ˆl–Ým_J*j"Tâ�nã!¸ÛjbÑ¿¿ 0ÂÁ�ÃÂÁFile not found. # ˆl–Ðz¾”Ji?u4 ^¸ËwÒ˜´oÀ „ í4ÿÃÂ?÷ using Microsoft.Win32.SafeHandles; using System; using System.Collections; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading; namespace Ansible.Process { internal class NativeHelpers { [StructLayout(LayoutKind.Sequential)] public class SECURITY_ATTRIBUTES { public UInt32 nLength; public IntPtr lpSecurityDescriptor; public bool bInheritHandle = false; public SECURITY_ATTRIBUTES() { nLength = (UInt32)Marshal.SizeOf(this); } } [StructLayout(LayoutKind.Sequential)] public class STARTUPINFO { public UInt32 cb; public IntPtr lpReserved; [MarshalAs(UnmanagedType.LPWStr)] public string lpDesktop; [MarshalAs(UnmanagedType.LPWStr)] public string lpTitle; public UInt32 dwX; public UInt32 dwY; public UInt32 dwXSize; public UInt32 dwYSize; public UInt32 dwXCountChars; public UInt32 dwYCountChars; public UInt32 dwFillAttribute; public StartupInfoFlags dwFlags; public UInt16 wShowWindow; public UInt16 cbReserved2; public IntPtr lpReserved2; public SafeFileHandle hStdInput; public SafeFileHandle hStdOutput; public SafeFileHandle hStdError; public STARTUPINFO() { cb = (UInt32)Marshal.SizeOf(this); } } [StructLayout(LayoutKind.Sequential)] public class STARTUPINFOEX { public STARTUPINFO startupInfo; public IntPtr lpAttributeList; public STARTUPINFOEX() { startupInfo = new STARTUPINFO(); startupInfo.cb = (UInt32)Marshal.SizeOf(this); } } [StructLayout(LayoutKind.Sequential)] public struct PROCESS_INFORMATION { public IntPtr hProcess; public IntPtr hThread; public int dwProcessId; public int dwThreadId; } [Flags] public enum ProcessCreationFlags : uint { CREATE_NEW_CONSOLE = 0x00000010, CREATE_UNICODE_ENVIRONMENT = 0x00000400, EXTENDED_STARTUPINFO_PRESENT = 0x00080000 } [Flags] public enum StartupInfoFlags : uint { USESTDHANDLES = 0x00000100 } [Flags] public enum HandleFlags : uint { None = 0, INHERIT = 1 } } internal class NativeMethods { [DllImport("kernel32.dll", SetLastError = true)] public static extern bool AllocConsole(); [DllImport("shell32.dll", SetLastError = true)] public static extern SafeMemoryBuffer CommandLineToArgvW( [MarshalAs(UnmanagedType.LPWStr)] string lpCmdLine, out int pNumArgs); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool CreatePipe( out SafeFileHandle hReadPipe, out SafeFileHandle hWritePipe, NativeHelpers.SECURITY_ATTRIBUTES lpPipeAttributes, UInt32 nSize); [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] public static extern bool CreateProcessW( [MarshalAs(UnmanagedType.LPWStr)] string lpApplicationName, StringBuilder lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, NativeHelpers.ProcessCreationFlags dwCreationFlags, SafeMemoryBuffer lpEnvironment, [MarshalAs(UnmanagedType.LPWStr)] string lpCurrentDirectory, NativeHelpers.STARTUPINFOEX lpStartupInfo, out Nat