ThreadPoolBoundHandle.BindHandle(SafeHandle) 方法

定義

傳回指定控制代碼的 ThreadPoolBoundHandle,它繫結至系統執行緒集區。

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

參數

handle
SafeHandle

物件,持有作業系統控制代碼。 控制代碼必須已經對 Unmanaged 程式碼中的重疊 I/O 開啟。

傳回

ThreadPoolBoundHandle

handleThreadPoolBoundHandle,它繫結至系統執行緒集區。

屬性

例外狀況

handlenull

已處置 handle

-或- handle 不表示有效的 I/O 控制代碼。

-或- handle 是指重疊 I/O 尚未開啟的控制代碼。

-或- handle 是指已繫結的控制代碼。

備註

每個控制碼都應該呼叫這個方法一次。

物件 ThreadPoolBoundHandle 不會取得 的擁有權 handle ;它仍然是呼叫端呼叫 Dispose 的責任。

適用於