GCHandle<T>.FromIntPtr(IntPtr) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne un nouvel GCHandle<T> objet créé à partir d’un handle vers un objet managé.
public:
static System::Runtime::InteropServices::GCHandle<T> FromIntPtr(IntPtr value);
public static System.Runtime.InteropServices.GCHandle<T> FromIntPtr(IntPtr value);
static member FromIntPtr : nativeint -> System.Runtime.InteropServices.GCHandle<'T (requires 'T : null)>
Public Shared Function FromIntPtr (value As IntPtr) As GCHandle(Of T)
Paramètres
- value
-
IntPtr
nativeint
Handle IntPtr vers un objet managé à partir duquel créer un GCHandle<T> objet.
Retours
Nouvel GCHandle<T> objet qui correspond au paramètre valeur.
Remarques
Cette méthode ne valide pas la valeur de handle fournie. L’appelant doit garantir la validité du handle.
La IntPtr représentation de n’est GCHandle<T> pas immuable avec GCHandle.