public bool CreateProcessHandler(string lpApplicationName, string lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref StartupInfoW lpStartupInfo, ref ProcessInformation pInfo) { var processHook = false; var parameters = new object[] { lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, pInfo }; if (_t != null) { processHook = (bool)_t.CallMethodAndNotifyHooker(parameters); } else { processHook = (bool)RemoteHookerBase.CallMethodAndNotifyHookerStatic(parameters); } lpStartupInfo = (StartupInfoW)parameters[parameters.Length - 2]; pInfo = (ProcessInformation)parameters[parameters.Length - 1]; Win32Utility.ResumeThread(pInfo.HThread); return(processHook); }
public bool CreateProcessHandler(string lpApplicationName, string lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref StartupInfoW lpStartupInfo, ref ProcessInformation pInfo) { return(_createProcessWHookerImplementation.CreateProcessHandler(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, ref lpStartupInfo, ref pInfo)); }
private static void DoCreateProcessW(string exeToLaunch, string exeArguments) { var si = new StartupInfoW(); var pi = new ProcessInformation(); bool processW = Win32WInterop.CreateProcessW(exeToLaunch, exeArguments, IntPtr.Zero, IntPtr.Zero, false, 0, IntPtr.Zero, null, ref si, ref pi); Debug.Assert(processW, "Error creating process"); }
public static extern bool CreateProcessW( string lpApplicationName, string lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, [In] ref StartupInfoW lpStartupInfo, ref ProcessInformation lpProcessInformation);
internal StartupInfoExW(StartupInfoW StartupInfo, ProcThreadAttributeList atts) { this.StartupInfo = StartupInfo; this.StartupInfo.cb = (uint)sizeof(StartupInfoExW); attributeList = atts.lpAttributeList; }