コード例 #1
0
 public static bool DetourCreateProcessWithDllsExA(
     string lpApplicationName,
     string lpCommandLine,
     IntPtr lpProcessAttributes,
     IntPtr lpThreadAttributes,
     bool bInheritHandles,
     uint dwCreationFlags,
     IntPtr lpEnvironment,
     string lpCurrentDirectory,
     ref NativeMethods.StartupInfo lpStartupInfo,
     out NativeMethods.ProcessInformation lpProcessInformation,
     uint nDlls,
     IntPtr rlpDlls,
     IntPtr pfCreateProcessA)
 {
     if (Is64Bit)
     {
         return(NativeApi64.DetourCreateProcessWithDllsExA(lpApplicationName,
                                                           lpCommandLine,
                                                           lpProcessAttributes,
                                                           lpThreadAttributes,
                                                           bInheritHandles,
                                                           dwCreationFlags,
                                                           lpEnvironment,
                                                           lpCurrentDirectory,
                                                           ref lpStartupInfo,
                                                           out lpProcessInformation,
                                                           nDlls,
                                                           rlpDlls,
                                                           pfCreateProcessA));
     }
     else
     {
         return(NativeApi32.DetourCreateProcessWithDllsExA(lpApplicationName,
                                                           lpCommandLine,
                                                           lpProcessAttributes,
                                                           lpThreadAttributes,
                                                           bInheritHandles,
                                                           dwCreationFlags,
                                                           lpEnvironment,
                                                           lpCurrentDirectory,
                                                           ref lpStartupInfo,
                                                           out lpProcessInformation,
                                                           nDlls,
                                                           rlpDlls,
                                                           pfCreateProcessA));
     }
 }
コード例 #2
0
 public static bool DetourCreateProcessWithDllsExA(
     string lpApplicationName,
     string lpCommandLine,
     IntPtr lpProcessAttributes,
     IntPtr lpThreadAttributes,
     bool bInheritHandles,
     uint dwCreationFlags,
     IntPtr lpEnvironment,
     string lpCurrentDirectory,
     ref Interop.Kernel32.STARTUPINFO lpStartupInfo,
     out Interop.Kernel32.PROCESS_INFORMATION lpProcessInformation,
     uint nDlls,
     IntPtr rlpDlls,
     IntPtr pfCreateProcessA)
 {
     if (Is64Bit)
     {
         return(NativeApi64.DetourCreateProcessWithDllsExA(lpApplicationName,
                                                           lpCommandLine,
                                                           lpProcessAttributes,
                                                           lpThreadAttributes,
                                                           bInheritHandles,
                                                           dwCreationFlags,
                                                           lpEnvironment,
                                                           lpCurrentDirectory,
                                                           ref lpStartupInfo,
                                                           out lpProcessInformation,
                                                           nDlls,
                                                           rlpDlls,
                                                           pfCreateProcessA));
     }
     else
     {
         return(NativeApi32.DetourCreateProcessWithDllsExA(lpApplicationName,
                                                           lpCommandLine,
                                                           lpProcessAttributes,
                                                           lpThreadAttributes,
                                                           bInheritHandles,
                                                           dwCreationFlags,
                                                           lpEnvironment,
                                                           lpCurrentDirectory,
                                                           ref lpStartupInfo,
                                                           out lpProcessInformation,
                                                           nDlls,
                                                           rlpDlls,
                                                           pfCreateProcessA));
     }
 }