ThreadPool.UnsafeQueueNativeOverlapped(NativeOverlapped*) 方法

定义

重要

此 API 不符合 CLS。

将重叠的 I/O 操作排队以便执行。

public:
 static bool UnsafeQueueNativeOverlapped(System::Threading::NativeOverlapped* overlapped);
[System.CLSCompliant(false)]
public static bool UnsafeQueueNativeOverlapped (System.Threading.NativeOverlapped* overlapped);
[System.CLSCompliant(false)]
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static bool UnsafeQueueNativeOverlapped (System.Threading.NativeOverlapped* overlapped);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public static bool UnsafeQueueNativeOverlapped (System.Threading.NativeOverlapped* overlapped);
[<System.CLSCompliant(false)>]
static member UnsafeQueueNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> bool
[<System.CLSCompliant(false)>]
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member UnsafeQueueNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> bool
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
static member UnsafeQueueNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> bool

参数

overlapped
NativeOverlapped*

要排队的 NativeOverlapped 结构。

返回

Boolean

如果成功地将此操作排队到 I/O 完成端口,则为 true;否则为 false

属性

注解

有关使用本机 Win32 重叠 I/O 的信息,请参阅 Overlapped Win32 平台 SDK 中的 类 NativeOverlapped 、结构和 OVERLAPPED 结构。

注意

UnsafeQueueNativeOverlapped使用 方法可能会无意中打开安全漏洞。 代码访问安全性基于堆栈上所有调用方的权限进行权限检查。 使用 UnsafeQueueNativeOverlapped在线程池线程上对工作进行排队时,线程池线程的堆栈没有实际调用方的上下文。 恶意代码可能会利用此漏洞来避免权限检查。

适用于