Example #1
0
        /// <summary>
        ///     Prepare custom JIT.
        /// </summary>
        private ManagedJit()
        {
            _framework = RuntimeFramework.GetFramework();

            _compileMethod          = CompileMethod;
            _resolveToken           = ResolveToken;
            _constructStringLiteral = ConstructStringLiteral;

            RuntimeHelperExtension.PrepareDelegate(_compileMethod, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, (uint)0, IntPtr.Zero, 0UL);
            RuntimeHelperExtension.PrepareDelegate(_resolveToken, IntPtr.Zero, IntPtr.Zero);
            RuntimeHelperExtension.PrepareDelegate(_constructStringLiteral, IntPtr.Zero, IntPtr.Zero, 0, IntPtr.Zero);

            _hookManager.InjectHook(_framework.ICorJitCompileVTable, _compileMethod);
            IsEnabled = true;
        }
Example #2
0
        static CEEInfoOffset()
        {
            RuntimeFramework framework = RuntimeFramework.GetFramework();

            ReadOffset(framework.IsCore, framework.FrameworkVersion);
        }