ThreadPoolBoundHandle.BindHandle(SafeHandle) Metodo

Definizione

Restituisce un oggetto ThreadPoolBoundHandle per l'handle specificato, associato al pool di thread del 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. È necessario che l'handle sia stato aperto per operazioni di I/O sovrapposte nel codice non gestito.

Restituisce

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

Attributi

Eccezioni

handle è null.

handle è stato eliminato.

-oppure-

handle non fa riferimento a un handle di operazioni 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 che è già stato associato.

Commenti

Questo metodo deve essere chiamato una volta per handle.

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

Si applica a