Пример #1
0
        internal static bool SetEntryPoint(MethodInfo mi, Pointer <byte> ptr)
        {
            if (!Mem.Is64Bit)
            {
                throw Guard.Require64BitFail(nameof(SetEntryPoint));
            }

            Restore(mi);

            return(NativeFunctions.Call <bool>((void *)ImportMap[nameof(SetEntryPoint)],
                                               mi.MethodHandle.Value.ToPointer(), ptr.ToPointer()));
        }