共用方式為


ThreadPool.BindHandle 方法

定義

可將作業系統的控制代碼繫結至 ThreadPool

多載

BindHandle(IntPtr)
已淘汰.
已淘汰.

可將作業系統的控制代碼繫結至 ThreadPool

BindHandle(SafeHandle)

可將作業系統的控制代碼繫結至 ThreadPool

BindHandle(IntPtr)

來源:
ThreadPool.Portable.Unix.cs
來源:
ThreadPool.Unix.cs
來源:
ThreadPool.Unix.cs

警告

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

警告

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

可將作業系統的控制代碼繫結至 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

參數

osHandle
IntPtr

nativeint

持有控制代碼的 IntPtr。 控制代碼必須已經對 Unmanaged 側的重疊 I/O 開啟。

傳回

如果控制代碼已繫結,則為 true;否則為 false

屬性

例外狀況

呼叫端沒有必要的權限。

備註

當 Windows 線程集區設定為使用而不是 .NET 線程集區時,不支援這個方法。 如需詳細資訊,請參閱 Windows 線程集區組態設定。 替代方法是 ThreadPoolBoundHandle 類別。

適用於

BindHandle(SafeHandle)

來源:
ThreadPool.Portable.Unix.cs
來源:
ThreadPool.Unix.cs
來源:
ThreadPool.Unix.cs

可將作業系統的控制代碼繫結至 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

參數

osHandle
SafeHandle

SafeHandle,包含作業系統控制代碼。 控制代碼必須已經對 Unmanaged 側的重疊 I/O 開啟。

傳回

如果控制代碼已繫結,則為 true;否則為 false

屬性

例外狀況

osHandlenull

備註

當 Windows 線程集區設定為使用而不是 .NET 線程集區時,不支援這個方法。 如需詳細資訊,請參閱 Windows 線程集區組態設定。 替代方法是 ThreadPoolBoundHandle 類別。

參數 osHandle 應該是 SafeFileHandle衍生自抽象 SafeHandle 類的 。

適用於