ThreadPoolBoundHandle.BindHandle(SafeHandle) Método
Definição
Retorna um ThreadPoolBoundHandle para o identificador especificado, associado ao pool de threads do sistema.Returns a ThreadPoolBoundHandle for the specified handle, which is bound to the system thread pool.
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
Parâmetros
- handle
- SafeHandle
Um objeto que contém o identificador do sistema operacional.An object that holds the operating system handle. O identificador deve ter sido aberto para a E/S sobreposta no código não gerenciado.The handle must have been opened for overlapped I/O in unmanaged code.
Retornos
Um ThreadPoolBoundHandle para handle, associado ao pool de threads do sistema.A ThreadPoolBoundHandle for handle, which is bound to the system thread pool.
- Atributos
Exceções
handle é null.handle is null.
O handle foi descartado.handle has been disposed.
- ou --or-
handle não se refere a um identificador de E/S válido.handle does not refer to a valid I/O handle.
- ou --or-
handle se refere a um identificador que não foi aberto para E/S sobreposta.handle refers to a handle that has not been opened for overlapped I/O.
- ou --or-
handle se refere a um identificador que já foi associado.handle refers to a handle that has already been bound.
Comentários
Esse método deve ser chamado uma vez por identificador.This method should be called once per handle.
O ThreadPoolBoundHandle objeto não se apropria de handle ; ele continua sendo a responsabilidade do chamador chamar Dispose .The ThreadPoolBoundHandle object does not take ownership of handle; it remains the responsibility of the caller to call Dispose.