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