ThreadPool.BindHandle Método

Definição

Associa um identificador de sistema operacional ao ThreadPool.

Sobrecargas

BindHandle(IntPtr)
Obsoleto.
Obsoleto.

Associa um identificador de sistema operacional ao ThreadPool.

BindHandle(SafeHandle)

Associa um identificador de sistema operacional ao ThreadPool.

BindHandle(IntPtr)

Cuidado

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

Cuidado

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

Associa um identificador de sistema operacional ao 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

Parâmetros

osHandle
IntPtr

nativeint

Um IntPtr que contém o identificador. O identificador deve ter sido aberto para o E/S sobreposto no lado não gerenciado.

Retornos

true se o identificador estiver associado; caso contrário, false.

Atributos

Exceções

O chamador não tem a permissão necessária.

Comentários

Não há suporte para esse método quando o pool de threads do Windows está configurado para ser usado em vez do pool de threads do .NET. Para obter mais informações, consulte a configuração do pool de threads do Windows. Uma alternativa é a ThreadPoolBoundHandle classe .

Aplica-se a

BindHandle(SafeHandle)

Associa um identificador de sistema operacional ao 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

Parâmetros

osHandle
SafeHandle

Um SafeHandle que contém o identificador do sistema operacional. O identificador deve ter sido aberto para o E/S sobreposto no lado não gerenciado.

Retornos

true se o identificador estiver associado; caso contrário, false.

Atributos

Exceções

osHandle é null.

Comentários

Não há suporte para esse método quando o pool de threads do Windows está configurado para ser usado em vez do pool de threads do .NET. Para obter mais informações, consulte a configuração do pool de threads do Windows. Uma alternativa é a ThreadPoolBoundHandle classe .

O osHandle parâmetro deve ser um SafeFileHandle, que deriva da classe abstrata SafeHandle .

Aplica-se a