ThreadPool.BindHandle Method

Definition

Binds an operating system handle to the ThreadPool.

Overloads

BindHandle(IntPtr)
Obsolete.
Obsolete.

Binds an operating system handle to the ThreadPool.

BindHandle(SafeHandle)

Binds an operating system handle to the ThreadPool.

BindHandle(IntPtr)

Caution

ThreadPool.BindHandle(IntPtr) has been deprecated. Please use ThreadPool.BindHandle(SafeHandle) instead.

Caution

ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.

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);
[System.Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.")]
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static bool BindHandle (IntPtr osHandle);
public static bool BindHandle (IntPtr osHandle);
[<System.Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated.  Please use ThreadPool.BindHandle(SafeHandle) instead.", false)>]
static member BindHandle : nativeint -> bool
[<System.Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.")>]
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member BindHandle : nativeint -> bool
static member BindHandle : nativeint -> bool
Public Shared Function BindHandle (osHandle As IntPtr) As Boolean

Parameters

osHandle
IntPtr

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

Returns

Boolean

true if the handle is bound; otherwise, false.

Attributes

Exceptions

The caller does not have the required permission.

Applies to

BindHandle(SafeHandle)

Binds an operating system handle to the ThreadPool.

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

Parameters

osHandle
SafeHandle

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

Returns

Boolean

true if the handle is bound; otherwise, false.

Attributes

Exceptions

osHandle is null.

Remarks

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

Applies to