ThreadPoolBoundHandle.BindHandle(SafeHandle) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Parameters
- handle
- SafeHandle
An object that holds the operating system handle. The handle must have been opened for overlapped I/O in unmanaged code.
Returns
A ThreadPoolBoundHandle for handle
, which is bound to the system thread pool.
- Attributes
Exceptions
handle
is null
.
handle
has been disposed.
-or-
handle
does not refer to a valid I/O handle.
-or-
handle
refers to a handle that has not been opened for overlapped I/O.
-or-
handle
refers to a handle that has already been bound.
Remarks
This method should be called once per handle.
The ThreadPoolBoundHandle object does not take ownership of handle
; it remains the responsibility of the caller to call Dispose.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應