แก้ไข

แชร์ผ่าน


ThreadPoolBoundHandle.BindHandle(SafeHandle) Method

Definition

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