コード例 #1
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static bool DetourCreateProcessWithDllExW(
     string lpApplicationName,
     string lpCommandLine,
     IntPtr lpProcessAttributes,
     IntPtr lpThreadAttributes,
     bool bInheritHandles,
     uint dwCreationFlags,
     IntPtr lpEnvironment,
     string lpCurrentDirectory,
     IntPtr lpStartupInfo,
     IntPtr lpProcessInformation,
     string lpDllName,
     IntPtr pfCreateProcessW)
 {
     if (Is64Bit)
     {
         return(NativeApi64.DetourCreateProcessWithDllExW(
                    lpApplicationName,
                    lpCommandLine,
                    lpProcessAttributes,
                    lpThreadAttributes,
                    bInheritHandles,
                    dwCreationFlags,
                    lpEnvironment,
                    lpCurrentDirectory,
                    lpStartupInfo,
                    lpProcessInformation,
                    lpDllName,
                    pfCreateProcessW));
     }
     else
     {
         return(NativeApi32.DetourCreateProcessWithDllExW(
                    lpApplicationName,
                    lpCommandLine,
                    lpProcessAttributes,
                    lpThreadAttributes,
                    bInheritHandles,
                    dwCreationFlags,
                    lpEnvironment,
                    lpCurrentDirectory,
                    lpStartupInfo,
                    lpProcessInformation,
                    lpDllName,
                    pfCreateProcessW));
     }
 }