ThreadPool.UnsafeQueueNativeOverlapped(NativeOverlapped*) 方法

定义

重要

此 API 不符合 CLS。

将重叠的 I/O 操作排队以便执行。Queues an overlapped I/O operation for execution.

public:
 static bool UnsafeQueueNativeOverlapped(System::Threading::NativeOverlapped* overlapped);
[System.CLSCompliant(false)]
public static bool UnsafeQueueNativeOverlapped (System.Threading.NativeOverlapped* overlapped);
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
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 结构。The NativeOverlapped structure to queue.

返回

Boolean

如果成功地将此操作排队到 I/O 完成端口,则为 true;否则为 falsetrue if the operation was successfully queued to an I/O completion port; otherwise, false.

属性

注解

有关使用本机 Win32 重叠 i/o 的信息,请参阅 Overlapped NativeOverlapped WIN32 平台 SDK 中的类、结构和 OVERLAPPED 结构。For information about using native Win32 overlapped I/O, see the Overlapped class, the NativeOverlapped structure, and the OVERLAPPED structure in the Win32 Platform SDK.

注意

使用 UnsafeQueueNativeOverlapped 方法可能会无意中打开安全漏洞。Using the UnsafeQueueNativeOverlapped method could inadvertently open up a security hole. 代码访问安全性根据堆栈上所有调用方的权限检查其权限。Code access security bases its permission checks on the permissions of all the callers on the stack. 当工作在线程池线程上使用排队时 UnsafeQueueNativeOverlapped ,线程池线程的堆栈没有实际调用方的上下文。When work is queued on a thread pool thread using UnsafeQueueNativeOverlapped, the stack of the thread pool thread does not have the context of the actual callers. 恶意代码可以利用此漏洞来避免权限检查。Malicious code might be able exploit this to avoid permission checks.

适用于