Ejemplo n.º 1
0
 static extern bool CreateProcess(string lpApplicationName,
    string lpCommandLine, ref SECURITY_ATTRIBUTES lpProcessAttributes,
    ref SECURITY_ATTRIBUTES lpThreadAttributes, bool bInheritHandles,
    uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory,
    [In] ref STARTUPINFO lpStartupInfo,
    out PROCESS_INFORMATION lpProcessInformation);
Ejemplo n.º 2
0
        public unsafe void startDumper()
        {
            string dumperExeName = System.IO.Path.Combine(acDumperPath, "acDumper.exe");

            PROCESS_INFORMATION pInfo = new PROCESS_INFORMATION();
            STARTUPINFO sInfo = new STARTUPINFO();
            SECURITY_ATTRIBUTES pSec = new SECURITY_ATTRIBUTES();
            SECURITY_ATTRIBUTES tSec = new SECURITY_ATTRIBUTES();
            pSec.nLength = Marshal.SizeOf(pSec);
            tSec.nLength = Marshal.SizeOf(tSec);

            sInfo.cb = Marshal.SizeOf(typeof(STARTUPINFO));
            sInfo.dwFlags = 0x00000001;
            sInfo.wShowWindow = 0;

            this.log("start " + dumperExeName);

            CreateProcess(null, "cmd.exe /c start /b /i " + dumperExeName,
            ref pSec, ref tSec, false, 0x00000010,
            IntPtr.Zero, acDumperPath, ref sInfo, out pInfo);
        }