ThreadPool.BindHandle 方法   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将操作系统句柄绑定到 ThreadPool。
重载
| BindHandle(IntPtr) | 
		已过时.
	 
		已过时.
	 将操作系统句柄绑定到 ThreadPool。 | 
| BindHandle(SafeHandle) | 将操作系统句柄绑定到 ThreadPool。 | 
BindHandle(IntPtr)
- Source:
- ThreadPool.Portable.Unix.cs
- Source:
- ThreadPool.Unix.cs
- Source:
- 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 -> boolstatic member BindHandle : nativeint -> boolPublic Shared Function BindHandle (osHandle As IntPtr) As Boolean参数
返回
如果绑定了句柄,则为 true;否则为 false。
- 属性
例外
调用方没有所要求的权限。
注解
将 Windows 线程池配置为使用 而不是 .NET 线程池时,不支持此方法。 有关详细信息,请参阅 Windows 线程池配置设置。 另一种选择是 ThreadPoolBoundHandle 类。
适用于
BindHandle(SafeHandle)
- Source:
- ThreadPool.Portable.Unix.cs
- Source:
- ThreadPool.Unix.cs
- Source:
- 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 -> boolstatic member BindHandle : System.Runtime.InteropServices.SafeHandle -> boolPublic Shared Function BindHandle (osHandle As SafeHandle) As Boolean参数
- osHandle
- SafeHandle
保存操作系统句柄的 SafeHandle。 在非托管端必须为重叠 I/O 打开该句柄。
返回
如果绑定了句柄,则为 true;否则为 false。
- 属性
例外
              osHandle 为 null。
注解
将 Windows 线程池配置为使用 而不是 .NET 线程池时,不支持此方法。 有关详细信息,请参阅 Windows 线程池配置设置。 另一种选择是 ThreadPoolBoundHandle 类。
参数 osHandle 应为 SafeFileHandle,它派生自抽象 SafeHandle 类。