ThreadPool.BindHandle Metodo

Definizione

Associa un handle del sistema operativo al ThreadPool.

Overload

BindHandle(IntPtr)
Obsoleti.
Obsoleti.

Associa un handle del sistema operativo al ThreadPool.

BindHandle(SafeHandle)

Associa un handle del sistema operativo al ThreadPool.

BindHandle(IntPtr)

Origine:
ThreadPool.Portable.Unix.cs
Origine:
ThreadPool.Unix.cs
Origine:
ThreadPool.Unix.cs

Attenzione

ThreadPool.BindHandle(IntPtr) has been deprecated. Please use ThreadPool.BindHandle(SafeHandle) instead.

Attenzione

ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.

Associa un handle del sistema operativo al ThreadPool.

public:
 static bool BindHandle(IntPtr osHandle);
[System.Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated.  Please use ThreadPool.BindHandle(SafeHandle) instead.", false)]
public static bool BindHandle (IntPtr osHandle);
[System.Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.")]
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static bool BindHandle (IntPtr osHandle);
public static bool BindHandle (IntPtr osHandle);
[<System.Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated.  Please use ThreadPool.BindHandle(SafeHandle) instead.", false)>]
static member BindHandle : nativeint -> bool
[<System.Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.")>]
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member BindHandle : nativeint -> bool
static member BindHandle : nativeint -> bool
Public Shared Function BindHandle (osHandle As IntPtr) As Boolean

Parametri

osHandle
IntPtr

nativeint

IntPtr che contiene l'handle. È necessario che l'handle sia stato aperto per operazioni di I/O sovrapposte nella parte non gestita.

Restituisce

true se l'handle è associato; in caso contrario, false.

Attributi

Eccezioni

Il chiamante non dispone dell'autorizzazione richiesta.

Commenti

Questo metodo non è supportato quando il pool di thread di Windows è configurato per essere usato invece del pool di thread .NET. Per altre informazioni, vedere l'impostazione di configurazione del pool di thread di Windows. Un'alternativa è la ThreadPoolBoundHandle classe .

Si applica a

BindHandle(SafeHandle)

Origine:
ThreadPool.Portable.Unix.cs
Origine:
ThreadPool.Unix.cs
Origine:
ThreadPool.Unix.cs

Associa un handle del sistema operativo al ThreadPool.

public:
 static bool BindHandle(System::Runtime::InteropServices::SafeHandle ^ osHandle);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static bool BindHandle (System.Runtime.InteropServices.SafeHandle osHandle);
[System.Security.SecurityCritical]
public static bool BindHandle (System.Runtime.InteropServices.SafeHandle osHandle);
public static bool BindHandle (System.Runtime.InteropServices.SafeHandle osHandle);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member BindHandle : System.Runtime.InteropServices.SafeHandle -> bool
[<System.Security.SecurityCritical>]
static member BindHandle : System.Runtime.InteropServices.SafeHandle -> bool
static member BindHandle : System.Runtime.InteropServices.SafeHandle -> bool
Public Shared Function BindHandle (osHandle As SafeHandle) As Boolean

Parametri

osHandle
SafeHandle

Oggetto SafeHandle che contiene l'handle del sistema operativo. È necessario che l'handle sia stato aperto per operazioni di I/O sovrapposte nella parte non gestita.

Restituisce

true se l'handle è associato; in caso contrario, false.

Attributi

Eccezioni

osHandle è null.

Commenti

Questo metodo non è supportato quando il pool di thread di Windows è configurato per essere usato invece del pool di thread .NET. Per altre informazioni, vedere l'impostazione di configurazione del pool di thread di Windows. Un'alternativa è la ThreadPoolBoundHandle classe .

Il osHandle parametro deve essere un SafeFileHandleoggetto , che deriva dalla classe astratta SafeHandle .

Si applica a