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