System.Runtime.InteropServices.GCHandle.InternalAddrOfPinnedObject C# (CSharp) Метод

InternalAddrOfPinnedObject() приватный Метод

private InternalAddrOfPinnedObject ( IntPtr handle ) : IntPtr
handle System.IntPtr
Результат System.IntPtr
        internal static extern IntPtr InternalAddrOfPinnedObject(IntPtr handle);
        [MethodImplAttribute(MethodImplOptions.InternalCall)]

Usage Example

Пример #1
0
 public IntPtr AddrOfPinnedObject()
 {
     if (this.IsPinned())
     {
         return(GCHandle.InternalAddrOfPinnedObject(this.GetHandleValue()));
     }
     if (this.m_handle == IntPtr.Zero)
     {
         throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_HandleIsNotInitialized"));
     }
     throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_HandleIsNotPinned"));
 }