Esempio n. 1
0
 public static void DetourBarrierGetCallingModule(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierGetCallingModule(out returnValue));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierGetCallingModule(out returnValue));
     }
 }
Esempio n. 2
0
 public static int RtlGetLastError()
 {
     if (Is64Bit)
     {
         return(NativeAPI64.RtlGetLastError());
     }
     else
     {
         return(NativeAPI32.RtlGetLastError());
     }
 }
Esempio n. 3
0
 public static void DetourBarrierEndStackTrace(IntPtr backup)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierEndStackTrace(backup));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierEndStackTrace(backup));
     }
 }
Esempio n. 4
0
 public static void DetourGetHookBypassAddress(IntPtr handle, out IntPtr address)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourGetHookBypassAddress(handle, out address));
     }
     else
     {
         Force(NativeAPI32.DetourGetHookBypassAddress(handle, out address));
     }
 }
Esempio n. 5
0
 public static void DetourBarrierBeginStackTrace(out IntPtr backup)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierBeginStackTrace(out backup));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierBeginStackTrace(out backup));
     }
 }
Esempio n. 6
0
 public static void DetourBarrierCallStackTrace(IntPtr backup, long maxCount, out long outMaxCount)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierCallStackTrace(backup, maxCount, out outMaxCount));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierCallStackTrace(backup, maxCount, out outMaxCount));
     }
 }
Esempio n. 7
0
 public static int DetourBarrierGetCallback(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         return(NativeAPI64.DetourBarrierGetCallback(out returnValue));
     }
     else
     {
         return(NativeAPI32.DetourBarrierGetCallback(out returnValue));
     }
 }
Esempio n. 8
0
 public static void DetourBarrierGetAddressOfReturnAddress(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierGetAddressOfReturnAddress(out returnValue));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierGetAddressOfReturnAddress(out returnValue));
     }
 }
Esempio n. 9
0
 public static void DetourWaitForPendingRemovals()
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourWaitForPendingRemovals());
     }
     else
     {
         Force(NativeAPI32.DetourWaitForPendingRemovals());
     }
 }
Esempio n. 10
0
 public static void DetourUninstallAllHooks()
 {
     if (Is64Bit)
     {
         NativeAPI64.DetourUninstallAllHooks();
     }
     else
     {
         NativeAPI32.DetourUninstallAllHooks();
     }
 }
Esempio n. 11
0
 public static void DetourUninstallHook(IntPtr refHandle)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourUninstallHook(refHandle));
     }
     else
     {
         Force(NativeAPI32.DetourUninstallHook(refHandle));
     }
 }
Esempio n. 12
0
 public static void DetourSetGlobalExclusiveACL(
     int[] threadIdList,
     int threadCount)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourSetGlobalExclusiveACL(threadIdList, threadCount));
     }
     else
     {
         Force(NativeAPI32.DetourSetGlobalExclusiveACL(threadIdList, threadCount));
     }
 }
Esempio n. 13
0
 public static bool DetourCreateProcessWithDllsExW(
     string lpApplicationName,
     string lpCommandLine,
     IntPtr lpProcessAttributes,
     IntPtr lpThreadAttributes,
     bool bInheritHandles,
     uint dwCreationFlags,
     IntPtr lpEnvironment,
     string lpCurrentDirectory,
     IntPtr lpStartupInfo,
     IntPtr lpProcessInformation,
     uint nDlls,
     IntPtr rlpDlls,
     IntPtr pfCreateProcessW)
 {
     if (Is64Bit)
     {
         return(NativeAPI64.DetourCreateProcessWithDllsExW(
                    lpApplicationName,
                    lpCommandLine,
                    lpProcessAttributes,
                    lpThreadAttributes,
                    bInheritHandles,
                    dwCreationFlags,
                    lpEnvironment,
                    lpCurrentDirectory,
                    lpStartupInfo,
                    lpProcessInformation,
                    nDlls,
                    rlpDlls,
                    pfCreateProcessW));
     }
     else
     {
         return(NativeAPI32.DetourCreateProcessWithDllsExW(
                    lpApplicationName,
                    lpCommandLine,
                    lpProcessAttributes,
                    lpThreadAttributes,
                    bInheritHandles,
                    dwCreationFlags,
                    lpEnvironment,
                    lpCurrentDirectory,
                    lpStartupInfo,
                    lpProcessInformation,
                    nDlls,
                    rlpDlls,
                    pfCreateProcessW));
     }
 }
Esempio n. 14
0
 public static void DetourSetExclusiveACL(
     int[] threadIdList,
     int threadCount,
     IntPtr handle)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourSetExclusiveACL(threadIdList, threadCount, handle));
     }
     else
     {
         Force(NativeAPI32.DetourSetExclusiveACL(threadIdList, threadCount, handle));
     }
 }
Esempio n. 15
0
 public static void DetourIsThreadIntercepted(
     IntPtr handle,
     int threadId,
     out bool result)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourIsThreadIntercepted(handle, threadId, out result));
     }
     else
     {
         Force(NativeAPI32.DetourIsThreadIntercepted(handle, threadId, out result));
     }
 }
Esempio n. 16
0
 public static IntPtr DetourFindFunction(
     string lpModule,
     string lpFunction)
 {
     if (Is64Bit)
     {
         return(NativeAPI64.DetourFindFunction(lpModule,
                                               lpFunction));
     }
     else
     {
         return(NativeAPI32.DetourFindFunction(lpModule,
                                               lpFunction));
     }
 }
Esempio n. 17
0
 public static void DetourInstallHook(
     IntPtr entryPoint,
     IntPtr hookProcedure,
     IntPtr callback,
     IntPtr handle)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourInstallHook(entryPoint, hookProcedure, callback, handle));
     }
     else
     {
         Force(NativeAPI32.DetourInstallHook(entryPoint, hookProcedure, callback, handle));
     }
 }