ThreadPoolBoundHandle.BindHandle(SafeHandle) Méthode

Définition

Retourne un ThreadPoolBoundHandle handle spécifié, lié au pool de threads système.

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

Paramètres

handle
SafeHandle

Objet qui contient le handle du système d’exploitation. Le handle doit avoir été ouvert pour les E/S qui se chevauchent dans du code non managé.

Retours

handlePour ThreadPoolBoundHandle , qui est lié au pool de threads système.

Attributs

Exceptions

handle a la valeur null.

handle a été supprimé.

-ou-

handle ne fait pas référence à un handle d’E/S valide.

-ou-

handle fait référence à un handle qui n’a pas été ouvert pour les E/S superposées.

-ou-

handle fait référence à un handle qui a déjà été lié.

Remarques

Cette méthode doit être appelée une fois par handle.

L’objet ThreadPoolBoundHandle ne prend pas possession de handle; il reste la responsabilité de l’appelant à appeler Dispose.

S’applique à