Esempio n. 1
0
        bool CreateProcess_Hooked_Wide(string lpApplicationName,
		   string lpCommandLine, IntPtr lpProcessAttributes,
		   IntPtr lpThreadAttributes, bool bInheritHandles,
		   uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory,
		   [In] ref STARTUPINFOW lpStartupInfo,
		   out PROCESS_INFORMATION lpProcessInformation)
        {
            try
            {
                m_controller.AdjustCommandLine(ref lpApplicationName, ref lpCommandLine);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Hook Error");
                lpProcessInformation = new PROCESS_INFORMATION();
                return false;
            }

            return CreateProcessW(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, ref lpStartupInfo, out lpProcessInformation);
        }
Esempio n. 2
0
        static extern bool CreateProcessW(string lpApplicationName,
		   string lpCommandLine, IntPtr lpProcessAttributes,
		   IntPtr lpThreadAttributes, bool bInheritHandles,
		   uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory,
		   [In] ref STARTUPINFOW lpStartupInfo,
		   out PROCESS_INFORMATION lpProcessInformation);