ThreadPoolBoundHandle.BindHandle(SafeHandle) Metodo

Definizione

Restituisce un ThreadPoolBoundHandle oggetto per l'handle specificato, associato al pool di thread di sistema.

public:
 static System::Threading::ThreadPoolBoundHandle ^ BindHandle(System::Runtime::InteropServices::SafeHandle ^ handle);
public static System.Threading.ThreadPoolBoundHandle BindHandle(System.Runtime.InteropServices.SafeHandle handle);
[System.Security.SecurityCritical]
public static System.Threading.ThreadPoolBoundHandle BindHandle(System.Runtime.InteropServices.SafeHandle handle);
static member BindHandle : System.Runtime.InteropServices.SafeHandle -> System.Threading.ThreadPoolBoundHandle
[<System.Security.SecurityCritical>]
static member BindHandle : System.Runtime.InteropServices.SafeHandle -> System.Threading.ThreadPoolBoundHandle
Public Shared Function BindHandle (handle As SafeHandle) As ThreadPoolBoundHandle

Parametri

handle
SafeHandle

Oggetto che contiene l'handle del sistema operativo. L'handle deve essere stato aperto per le operazioni di I/O sovrapposte nel codice non gestito.

Valori restituiti

Oggetto ThreadPoolBoundHandle per handle, associato al pool di thread di sistema.

Attributi

Eccezioni

handle è null.

handle è stato eliminato.

oppure

handle non fa riferimento a un handle di I/O valido.

oppure

handle fa riferimento a un handle che non è stato aperto per operazioni di I/O sovrapposte.

oppure

handle fa riferimento a un handle già associato.

Commenti

Questo metodo deve essere chiamato una volta per handle.

L'oggetto ThreadPoolBoundHandle non assume la proprietà di handle; rimane responsabilità del chiamante chiamare Dispose.

Si applica a