ThreadPool.UnsafeQueueNativeOverlapped(NativeOverlapped*) 方法

定义

重要

此 API 不符合 CLS。

对重叠的 I/O 操作进行排队以执行。

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)]
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)>]
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member UnsafeQueueNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> bool
[<System.CLSCompliant(false)>]
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 排队的结构。

返回

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

属性

注解

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

Caution

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

适用于