Exemplo n.º 1
0
 public static void DetourBarrierGetCallingModule(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierGetCallingModule(out returnValue));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierGetCallingModule(out returnValue));
     }
 }
Exemplo n.º 2
0
 public static int RtlGetLastError()
 {
     if (Is64Bit)
     {
         return(NativeAPI64.RtlGetLastError());
     }
     else
     {
         return(NativeAPI32.RtlGetLastError());
     }
 }
Exemplo n.º 3
0
 public static void DetourBarrierEndStackTrace(IntPtr backup)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierEndStackTrace(backup));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierEndStackTrace(backup));
     }
 }
Exemplo 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));
     }
 }
Exemplo n.º 5
0
 public static void DetourBarrierBeginStackTrace(out IntPtr backup)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierBeginStackTrace(out backup));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierBeginStackTrace(out backup));
     }
 }
Exemplo 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));
     }
 }
Exemplo n.º 7
0
 public static int DetourBarrierGetCallback(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         return(NativeAPI64.DetourBarrierGetCallback(out returnValue));
     }
     else
     {
         return(NativeAPI32.DetourBarrierGetCallback(out returnValue));
     }
 }
Exemplo n.º 8
0
 public static void DetourBarrierGetAddressOfReturnAddress(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourBarrierGetAddressOfReturnAddress(out returnValue));
     }
     else
     {
         Force(NativeAPI32.DetourBarrierGetAddressOfReturnAddress(out returnValue));
     }
 }
Exemplo n.º 9
0
 public static void DetourWaitForPendingRemovals()
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourWaitForPendingRemovals());
     }
     else
     {
         Force(NativeAPI32.DetourWaitForPendingRemovals());
     }
 }
Exemplo n.º 10
0
 public static void DetourUninstallAllHooks()
 {
     if (Is64Bit)
     {
         NativeAPI64.DetourUninstallAllHooks();
     }
     else
     {
         NativeAPI32.DetourUninstallAllHooks();
     }
 }
Exemplo n.º 11
0
 public static void DetourUninstallHook(IntPtr refHandle)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourUninstallHook(refHandle));
     }
     else
     {
         Force(NativeAPI32.DetourUninstallHook(refHandle));
     }
 }
Exemplo n.º 12
0
 public static void DetourSetGlobalExclusiveACL(
     int[] threadIdList,
     int threadCount)
 {
     if (Is64Bit)
     {
         Force(NativeAPI64.DetourSetGlobalExclusiveACL(threadIdList, threadCount));
     }
     else
     {
         Force(NativeAPI32.DetourSetGlobalExclusiveACL(threadIdList, threadCount));
     }
 }
Exemplo 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));
     }
 }
Exemplo 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));
     }
 }
Exemplo 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));
     }
 }
Exemplo n.º 16
0
 public static IntPtr DetourFindFunction(
     string lpModule,
     string lpFunction)
 {
     if (Is64Bit)
     {
         return(NativeAPI64.DetourFindFunction(lpModule,
                                               lpFunction));
     }
     else
     {
         return(NativeAPI32.DetourFindFunction(lpModule,
                                               lpFunction));
     }
 }
Exemplo 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));
     }
 }