<Type Name="GCHandle" FullName="System.Runtime.InteropServices.GCHandle" FullNameSP="System_Runtime_InteropServices_GCHandle" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public sequential sealed GCHandle extends System.ValueType" />
  <TypeSignature Language="C#" Value="public struct GCHandle" />
  <TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit GCHandle extends System.ValueType" />
  <MemberOfLibrary>RuntimeInfrastructure</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>mscorlib</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Base>
    <BaseTypeName>System.ValueType</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes>
    <Attribute>
      <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>
      <para> Provides a means for referencing a managed object from
      unmanaged memory.</para>
    </summary>
    <remarks>
      <para>Use a <see cref="T:System.Runtime.InteropServices.GCHandle" /> when an 
   object reference is required to be accessible from unmanaged
   memory.</para>
      <para> The <see cref="T:System.Runtime.InteropServices.GCHandleType" /> enumeration describes the
possible <see cref="T:System.Runtime.InteropServices.GCHandle" />
types.</para>
      <para>
        <block subset="none" type="note">If the type of the <see cref="T:System.Runtime.InteropServices.GCHandle" /> is
<see cref="F:System.Runtime.InteropServices.GCHandleType.Normal" />, then it is an opaque
handle, and the address of the object it references cannot be resolved through
it.</block>
      </para>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName="AddrOfPinnedObject">
      <MemberSignature Language="ILASM" Value=".method public hidebysig instance valuetype System.IntPtr AddrOfPinnedObject()" />
      <MemberSignature Language="C#" Value="public IntPtr AddrOfPinnedObject ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance native int AddrOfPinnedObject() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.IntPtr</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Returns the address of an object being referred to by a <see cref="F:System.Runtime.InteropServices.GCHandleType.Pinned" /> handle.</para>
        </summary>
        <returns>
          <para>A <see cref="T:System.IntPtr" /> containing the address of the of the <see cref="F:System.Runtime.InteropServices.GCHandleType.Pinned" /> object as a
<see cref="T:System.IntPtr" /> .</para>
        </returns>
        <remarks>To be added.</remarks>
        <exception cref="T:System.InvalidOperationException">The handle type is not <see cref="F:System.Runtime.InteropServices.GCHandleType.Pinned" /> .</exception>
        <permission cref="T:System.Security.Permissions.SecurityPermission">
          <para>Requires permission to call unmanaged code. See <see cref="F:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode" qualify="true" /> .</para>
        </permission>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Alloc">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static valuetype System.Runtime.InteropServices.GCHandle Alloc(object value)" />
      <MemberSignature Language="C#" Value="public static System.Runtime.InteropServices.GCHandle Alloc (object value);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Runtime.InteropServices.GCHandle Alloc(object value) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Runtime.InteropServices.GCHandle</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="value" Type="System.Object" />
      </Parameters>
      <Docs>
        <param name="value">The object for which the <see cref="T:System.Runtime.InteropServices.GCHandle" /> is created. Can be <see langword="null" /> .</param>
        <summary>
          <para>Allocates a <see cref="F:System.Runtime.InteropServices.GCHandleType.Normal" qualify="true" />
handle for the specified object.</para>
        </summary>
        <returns>
          <para> A new <see cref="T:System.Runtime.InteropServices.GCHandle" /> instance that protects the
   object from garbage collection.</para>
        </returns>
        <remarks>
          <para>A <see cref="F:System.Runtime.InteropServices.GCHandleType.Normal" /> handle ensures the
   object will not be collected by the garbage collector.</para>
          <para>If the <paramref name="value" />
parameter is <see langword="null" />, this method
returns a valid <see cref="T:System.Runtime.InteropServices.GCHandle" />. <block subset="none" type="note">The target of the handle can be changed via the
<see cref="P:System.Runtime.InteropServices.GCHandle.Target" /> property.</block></para>
        </remarks>
        <permission cref="T:System.Security.Permissions.SecurityPermission">
          <para>Requires permission to call unmanaged code. See <see cref="F:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode" qualify="true" /> .</para>
        </permission>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Alloc">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static valuetype System.Runtime.InteropServices.GCHandle Alloc(object value, valuetype System.Runtime.InteropServices.GCHandleType type)" />
      <MemberSignature Language="C#" Value="public static System.Runtime.InteropServices.GCHandle Alloc (object value, System.Runtime.InteropServices.GCHandleType type);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Runtime.InteropServices.GCHandle Alloc(object value, valuetype System.Runtime.InteropServices.GCHandleType type) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Runtime.InteropServices.GCHandle</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="value" Type="System.Object" />
        <Parameter Name="type" Type="System.Runtime.InteropServices.GCHandleType" />
      </Parameters>
      <Docs>
        <param name="value">The object for which the <see cref="T:System.Runtime.InteropServices.GCHandle" /> is created. Can be <see langword="null" /> .</param>
        <param name="type">A <see cref="T:System.Runtime.InteropServices.GCHandleType" /> value that specifies the type of <see cref="T:System.Runtime.InteropServices.GCHandle" /> to create.</param>
        <param name="type">To be added.</param>
        <summary>
          <para>Allocates a handle of the specified type for the specified object.</para>
        </summary>
        <returns>
          <para> A new <see cref="T:System.Runtime.InteropServices.GCHandle" /> instance
   that protects the object.</para>
        </returns>
        <remarks>
          <para> If the <paramref name="value" /> parameter is
<see langword="null" /> , this method returns a valid <see cref="T:System.Runtime.InteropServices.GCHandle" />. <block subset="none" type="note">The target of 
   the handle can be changed via the <see cref="P:System.Runtime.InteropServices.GCHandle.Target" />
   property.</block></para>
        </remarks>
        <permission cref="T:System.Security.Permissions.SecurityPermission">
          <para>Requires permission to call unmanaged code. See <see cref="F:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode" qualify="true" /> .</para>
        </permission>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Equals">
      <MemberSignature Language="C#" Value="public override bool Equals (object o);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object o) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="o" Type="System.Object" />
      </Parameters>
      <Docs>
        <param name="o">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="Free">
      <MemberSignature Language="ILASM" Value=".method public hidebysig instance void Free()" />
      <MemberSignature Language="C#" Value="public void Free ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Free() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Frees a <see cref="T:System.Runtime.InteropServices.GCHandle" />.</para>
        </summary>
        <remarks>
          <para> The caller is required to provide synchronization to
 prevent multiple threads from executing this method simultaneously for a given
 handle.</para>
        </remarks>
        <exception cref="T:System.InvalidOperationException">The handle has already been freed or was never initialized.</exception>
        <permission cref="T:System.Security.Permissions.SecurityPermission">
          <para>Requires permission to call unmanaged code. See <see cref="F:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode" qualify="true" /> .</para>
        </permission>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="FromIntPtr">
      <MemberSignature Language="C#" Value="public static System.Runtime.InteropServices.GCHandle FromIntPtr (IntPtr value);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Runtime.InteropServices.GCHandle FromIntPtr(native int value) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Runtime.InteropServices.GCHandle</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="value" Type="System.IntPtr" />
      </Parameters>
      <Docs>
        <param name="value">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="GetHashCode">
      <MemberSignature Language="C#" Value="public override int GetHashCode ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Int32</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="IsAllocated">
      <MemberSignature Language="ILASM" Value=".property bool IsAllocated { public hidebysig specialname instance bool get_IsAllocated() }" />
      <MemberSignature Language="C#" Value="public bool IsAllocated { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance bool IsAllocated" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Gets a <see cref="T:System.Boolean" /> value indicating whether the current <see cref="T:System.Runtime.InteropServices.GCHandle" /> instance is allocated.</para>
        </summary>
        <value>
          <para>
            <see langword="true" /> if the handle
 is allocated; otherwise, <see langword="false" /> .</para>
        </value>
        <remarks>
          <para>This property is read-only.</para>
          <para> Use this method to determine whether
 the <see cref="T:System.Runtime.InteropServices.GCHandle" />
 
 is still available.</para>
          <para>
            <block subset="none" type="note">When the garbage collector collects the
 object, the handle could still be resurrected in the finalizer.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="op_Equality">
      <MemberSignature Language="C#" Value="public static bool op_Equality (System.Runtime.InteropServices.GCHandle a, System.Runtime.InteropServices.GCHandle b);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_Equality(valuetype System.Runtime.InteropServices.GCHandle a, valuetype System.Runtime.InteropServices.GCHandle b) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="a" Type="System.Runtime.InteropServices.GCHandle" />
        <Parameter Name="b" Type="System.Runtime.InteropServices.GCHandle" />
      </Parameters>
      <Docs>
        <param name="a">To be added.</param>
        <param name="b">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="op_Explicit">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static specialname valuetype System.Runtime.InteropServices.GCHandle op_Explicit(valuetype System.IntPtr value)" />
      <MemberSignature Language="C#" Value="public static System.Runtime.InteropServices.GCHandle op_Explicit (IntPtr value);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.Runtime.InteropServices.GCHandle op_Explicit(native int value) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Runtime.InteropServices.GCHandle</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="value" Type="System.IntPtr" />
      </Parameters>
      <Docs>
        <param name="value">The <see cref="T:System.IntPtr" /> to be converted.</param>
        <summary>
          <para> Convert a <see cref="T:System.IntPtr" /> to a <see cref="T:System.Runtime.InteropServices.GCHandle" />
instance.</para>
        </summary>
        <returns>
          <para> A <see cref="T:System.Runtime.InteropServices.GCHandle" /> .</para>
        </returns>
        <remarks>
          <para>
            <see cref="T:System.Runtime.InteropServices.GCHandle" />
instances are stored using an internal integer
representation. This method allows you to retrieve a <see cref="T:System.Runtime.InteropServices.GCHandle" />
from its integer representation.</para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="op_Explicit">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static specialname valuetype System.IntPtr op_Explicit(valuetype System.Runtime.InteropServices.GCHandle value)" />
      <MemberSignature Language="C#" Value="public static IntPtr op_Explicit (System.Runtime.InteropServices.GCHandle value);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname native int op_Explicit(valuetype System.Runtime.InteropServices.GCHandle value) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.IntPtr</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="value" Type="System.Runtime.InteropServices.GCHandle" />
      </Parameters>
      <Docs>
        <param name="value">The <see cref="T:System.Runtime.InteropServices.GCHandle" /> to be converted.</param>
        <summary>
          <para> Converts a <see cref="T:System.Runtime.InteropServices.GCHandle" /> instance to
   a <see cref="T:System.IntPtr" />.</para>
        </summary>
        <returns>
          <para>A <see cref="T:System.IntPtr" /> representation of the specified <see cref="T:System.Runtime.InteropServices.GCHandle" /> .</para>
        </returns>
        <remarks>
          <para>
            <see cref="T:System.Runtime.InteropServices.GCHandle" /> instances are stored using
   an internal integer representation. This method allows you to retrieve that
   representation.</para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="op_Inequality">
      <MemberSignature Language="C#" Value="public static bool op_Inequality (System.Runtime.InteropServices.GCHandle a, System.Runtime.InteropServices.GCHandle b);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_Inequality(valuetype System.Runtime.InteropServices.GCHandle a, valuetype System.Runtime.InteropServices.GCHandle b) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="a" Type="System.Runtime.InteropServices.GCHandle" />
        <Parameter Name="b" Type="System.Runtime.InteropServices.GCHandle" />
      </Parameters>
      <Docs>
        <param name="a">To be added.</param>
        <param name="b">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="Target">
      <MemberSignature Language="ILASM" Value=".property object Target { public hidebysig specialname instance object get_Target() public hidebysig specialname instance void set_Target(object value) }" />
      <MemberSignature Language="C#" Value="public object Target { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance object Target" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Gets or sets a reference to the object the current <see cref="T:System.Runtime.InteropServices.GCHandle" /> instance represents.</para>
        </summary>
        <value>
          <para>The object this handle represents.</para>
        </value>
        <remarks>To be added.</remarks>
        <exception cref="T:System.InvalidOperationException">
          <para>The current <see cref="T:System.Runtime.InteropServices.GCHandle" /> instance has already been freed or was never initialized.</para>
        </exception>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="ToIntPtr">
      <MemberSignature Language="C#" Value="public static IntPtr ToIntPtr (System.Runtime.InteropServices.GCHandle value);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig native int ToIntPtr(valuetype System.Runtime.InteropServices.GCHandle value) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.IntPtr</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="value" Type="System.Runtime.InteropServices.GCHandle" />
      </Parameters>
      <Docs>
        <param name="value">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>
