コード例 #1
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourBarrierEndStackTrace(IntPtr backup)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourBarrierEndStackTrace(backup));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourBarrierEndStackTrace(backup));
     }
 }
コード例 #2
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourGetHookBypassAddress(IntPtr handle, out IntPtr address)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourGetHookBypassAddress(handle, out address));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourGetHookBypassAddress(handle, out address));
     }
 }
コード例 #3
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourBarrierGetAddressOfReturnAddress(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourBarrierGetAddressOfReturnAddress(out returnValue));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourBarrierGetAddressOfReturnAddress(out returnValue));
     }
 }
コード例 #4
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourBarrierCallStackTrace(IntPtr backup, long maxCount, out long outMaxCount)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourBarrierCallStackTrace(backup, maxCount, out outMaxCount));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourBarrierCallStackTrace(backup, maxCount, out outMaxCount));
     }
 }
コード例 #5
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourBarrierGetCallingModule(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourBarrierGetCallingModule(out returnValue));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourBarrierGetCallingModule(out returnValue));
     }
 }
コード例 #6
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static int DetourBarrierGetCallback(out IntPtr returnValue)
 {
     if (Is64Bit)
     {
         return(NativeApi64.DetourBarrierGetCallback(out returnValue));
     }
     else
     {
         return(NativeApi32.DetourBarrierGetCallback(out returnValue));
     }
 }
コード例 #7
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourWaitForPendingRemovals()
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourWaitForPendingRemovals());
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourWaitForPendingRemovals());
     }
 }
コード例 #8
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourUninstallHook(IntPtr refHandle)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourUninstallHook(refHandle));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourUninstallHook(refHandle));
     }
 }
コード例 #9
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourUninstallAllHooks()
 {
     if (Is64Bit)
     {
         NativeApi64.DetourUninstallAllHooks();
     }
     else
     {
         NativeApi32.DetourUninstallAllHooks();
     }
 }
コード例 #10
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourSetGlobalExclusiveACL(
     int[] threadIdList,
     int threadCount)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourSetGlobalExclusiveACL(threadIdList, threadCount));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourSetGlobalExclusiveACL(threadIdList, threadCount));
     }
 }
コード例 #11
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 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));
     }
 }
コード例 #12
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourSetInclusiveACL(
     int[] threadIdList,
     int threadCount,
     IntPtr handle)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourSetInclusiveACL(threadIdList, threadCount, handle));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourSetInclusiveACL(threadIdList, threadCount, handle));
     }
 }
コード例 #13
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourIsThreadIntercepted(
     IntPtr handle,
     int threadId,
     out bool result)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourIsThreadIntercepted(handle, threadId, out result));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourIsThreadIntercepted(handle, threadId, out result));
     }
 }
コード例 #14
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static IntPtr DetourFindFunction(
     string lpModule,
     string lpFunction)
 {
     if (Is64Bit)
     {
         return(NativeApi64.DetourFindFunction(lpModule,
                                               lpFunction));
     }
     else
     {
         return(NativeApi32.DetourFindFunction(lpModule,
                                               lpFunction));
     }
 }
コード例 #15
0
ファイル: NativeImport.cs プロジェクト: zcanann/CoreHook
 public static void DetourInstallHook(
     IntPtr entryPoint,
     IntPtr hookProcedure,
     IntPtr callback,
     IntPtr handle)
 {
     if (Is64Bit)
     {
         HandleErrorCode(NativeApi64.DetourInstallHook(entryPoint, hookProcedure, callback, handle));
     }
     else
     {
         HandleErrorCode(NativeApi32.DetourInstallHook(entryPoint, hookProcedure, callback, handle));
     }
 }