ThreadPool.BindHandle ThreadPool.BindHandle ThreadPool.BindHandle ThreadPool.BindHandle Method

Definition

Binds an operating system handle to the ThreadPool.

Overloads

BindHandle(IntPtr) BindHandle(IntPtr) BindHandle(IntPtr) BindHandle(IntPtr)

Binds an operating system handle to the ThreadPool.

BindHandle(SafeHandle) BindHandle(SafeHandle) BindHandle(SafeHandle) BindHandle(SafeHandle)

Binds an operating system handle to the ThreadPool.

BindHandle(IntPtr) BindHandle(IntPtr) BindHandle(IntPtr) BindHandle(IntPtr)

Warning

This API is now obsolete.

Binds an operating system handle to the ThreadPool.

public:
 static bool BindHandle(IntPtr osHandle);
[System.Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated.  Please use ThreadPool.BindHandle(SafeHandle) instead.", false)]
public static bool BindHandle (IntPtr osHandle);
static member BindHandle : nativeint -> bool
Public Shared Function BindHandle (osHandle As IntPtr) As Boolean
Parameters
osHandle
IntPtr IntPtr IntPtr IntPtr

An IntPtr that holds the handle. The handle must have been opened for overlapped I/O on the unmanaged side.

Returns

true if the handle is bound; otherwise, false.

Exceptions

The caller does not have the required permission.

Security

SecurityPermission
for the ability to call unmanaged code. Associated enumeration: UnmanagedCode.

BindHandle(SafeHandle) BindHandle(SafeHandle) BindHandle(SafeHandle) BindHandle(SafeHandle)

Binds an operating system handle to the ThreadPool.

public:
 static bool BindHandle(System::Runtime::InteropServices::SafeHandle ^ osHandle);
[System.Security.SecurityCritical]
public static bool BindHandle (System.Runtime.InteropServices.SafeHandle osHandle);
static member BindHandle : System.Runtime.InteropServices.SafeHandle -> bool
Public Shared Function BindHandle (osHandle As SafeHandle) As Boolean
Parameters
osHandle
SafeHandle SafeHandle SafeHandle SafeHandle

A SafeHandle that holds the operating system handle. The handle must have been opened for overlapped I/O on the unmanaged side.

Returns

true if the handle is bound; otherwise, false.

Exceptions

Remarks

The osHandle parameter should be a SafeFileHandle, which derives from the abstract SafeHandle class.

Security

SecurityPermission
for the ability to call unmanaged code. Associated enumeration: UnmanagedCode.

Applies to