ThreadPoolBoundHandle.BindHandle(SafeHandle) 方法

定義

回傳指定的句柄 a 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

一個存放作業系統 handle 的物件。 在非管理程式碼中,該 handle 必須是為了重疊 I/O 而開啟。

傳回

ThreadPoolBoundHandle A 對 handle,綁定到系統執行緒池。

屬性

例外狀況

handlenull

handle 已被處理掉。

-或-

handle 不指有效的 I/O 處理柄。

-或-

handle 指的是尚未開啟重疊 I/O 的把柄。

-或-

handle 指的是已經綁定過的把柄。

備註

此方法應為每個句柄呼叫一次。

ThreadPoolBoundHandle物件不擁有 ;handle呼叫者仍有責任呼叫 Dispose

適用於