Lingua

GCHandle<T>.FromIntPtr(IntPtr) Metodo

Definizione

Restituisce un nuovo GCHandle<T> oggetto creato da un handle a un oggetto gestito.

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)

Parametri

value
IntPtr

nativeint

Handle IntPtr di un oggetto gestito da cui creare un GCHandle<T> oggetto .

Valori restituiti

Nuovo GCHandle<T> oggetto che corrisponde al parametro value.

Commenti

Questo metodo non convalida il valore dell'handle fornito. Il chiamante deve garantire la validità dell'handle.

La IntPtr rappresentazione di GCHandle<T> non è modificabile con GCHandle.

Si applica a