GetFunctionPointer() private method

private GetFunctionPointer ( ) : IntPtr
return IntPtr
 public static RedirectCallsState RedirectCalls(RuntimeMethodHandle from, RuntimeMethodHandle to)
 {
     // GetFunctionPointer enforces compilation of the method.
     var fptr1 = from.GetFunctionPointer();
     var fptr2 = to.GetFunctionPointer();
     return PatchJumpTo(fptr1, fptr2);
 }
Exemplo n.º 2
0
        public IntPtr GetFunctionPointer()
        {
            IntPtr functionPointer = RuntimeMethodHandle.GetFunctionPointer(RuntimeMethodHandle.EnsureNonNullMethodInfo(this.m_value).Value);

            GC.KeepAlive(this.m_value);
            return(functionPointer);
        }
Exemplo n.º 3
0
 /// <summary>Obtains a pointer to the method represented by this instance.</summary>
 /// <returns>A pointer to the method represented by this instance.</returns>
 /// <exception cref="T:System.Security.SecurityException">The caller does not have the necessary permission to perform this operation.</exception>
 /// <filterpriority>2</filterpriority>
 public IntPtr GetFunctionPointer()
 {
     return(RuntimeMethodHandle.GetFunctionPointer(this.value));
 }