示例#1
0
 public static bool DetourCreateProcessWithDllExA(
     string lpApplicationName,
     string lpCommandLine,
     IntPtr lpProcessAttributes,
     IntPtr lpThreadAttributes,
     bool bInheritHandles,
     uint dwCreationFlags,
     IntPtr lpEnvironment,
     string lpCurrentDirectory,
     ref NativeMethods.StartupInfo lpStartupInfo,
     out NativeMethods.ProcessInformation lpProcessInformation,
     string lpDllName,
     IntPtr pfCreateProcessA)
 {
     if (Is64Bit)
     {
         return(NativeApi64.DetourCreateProcessWithDllExA(lpApplicationName,
                                                          lpCommandLine,
                                                          lpProcessAttributes,
                                                          lpThreadAttributes,
                                                          bInheritHandles,
                                                          dwCreationFlags,
                                                          lpEnvironment,
                                                          lpCurrentDirectory,
                                                          ref lpStartupInfo,
                                                          out lpProcessInformation,
                                                          lpDllName,
                                                          pfCreateProcessA));
     }
     else
     {
         return(NativeApi32.DetourCreateProcessWithDllExA(lpApplicationName,
                                                          lpCommandLine,
                                                          lpProcessAttributes,
                                                          lpThreadAttributes,
                                                          bInheritHandles,
                                                          dwCreationFlags,
                                                          lpEnvironment,
                                                          lpCurrentDirectory,
                                                          ref lpStartupInfo,
                                                          out lpProcessInformation,
                                                          lpDllName,
                                                          pfCreateProcessA));
     }
 }
示例#2
0
 public static bool DetourCreateProcessWithDllExA(
     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,
     string lpDllName,
     IntPtr pfCreateProcessA)
 {
     if (Is64Bit)
     {
         return(NativeApi64.DetourCreateProcessWithDllExA(lpApplicationName,
                                                          lpCommandLine,
                                                          lpProcessAttributes,
                                                          lpThreadAttributes,
                                                          bInheritHandles,
                                                          dwCreationFlags,
                                                          lpEnvironment,
                                                          lpCurrentDirectory,
                                                          ref lpStartupInfo,
                                                          out lpProcessInformation,
                                                          lpDllName,
                                                          pfCreateProcessA));
     }
     else
     {
         return(NativeApi32.DetourCreateProcessWithDllExA(lpApplicationName,
                                                          lpCommandLine,
                                                          lpProcessAttributes,
                                                          lpThreadAttributes,
                                                          bInheritHandles,
                                                          dwCreationFlags,
                                                          lpEnvironment,
                                                          lpCurrentDirectory,
                                                          ref lpStartupInfo,
                                                          out lpProcessInformation,
                                                          lpDllName,
                                                          pfCreateProcessA));
     }
 }