Exemple #1
0
        public static void RevertRedirect(MethodInfo from, RedirectCallsState state)
        {
            var fptr1 = from.MethodHandle.GetFunctionPointer();

            MP_Logging.Log("Reverting " + fptr1 + "...");
            RevertJumpTo(fptr1, state);
        }
Exemple #2
0
 private void fixConfig()
 {
     MP_Logging.Log("Integrity broken! Reloading....");
     File.Delete(_path);
     createConfig(_path);
     MP_Logging.Log("Config reloaded!");
 }
Exemple #3
0
        public static RedirectCallsState RedirectCalls(MethodInfo from, MethodInfo to)
        {
            var fptr1 = from.MethodHandle.GetFunctionPointer();
            var fptr2 = to.MethodHandle.GetFunctionPointer();

            MP_Logging.Log("Patching " + fptr1 + " to " + fptr2);
            return(PatchJumpTo(fptr1, fptr2));
        }