GCHandle<T>.FromIntPtr(IntPtr) Método

Definição

Devolve um novo GCHandle<T> objeto criado a partir de um handle para um objeto gerido.

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)

Parâmetros

value
IntPtr

nativeint

Um IntPtr handle para um objeto gerido a partir do qual se pode criar um GCHandle<T> objeto.

Devoluções

Um novo GCHandle<T> objeto que corresponde ao parâmetro de valor.

Observações

Este método não valida o valor do handle fornecido. O chamador deve garantir a validade do handle.

A IntPtr representação de GCHandle<T> não é intercambiável com GCHandle.

Aplica-se a