System.Threading.ThreadPool.UnsafeQueueNativeOverlapped Method

Queues an overlapped I/O operation for execution.

Syntax

[System.CLSCompliant(false)]
public static bool UnsafeQueueNativeOverlapped (NativeOverlapped* overlapped)

Parameters

overlapped
The System.Threading.NativeOverlapped structure to queue.

Returns

true if the operation was successfully queued to an I/O completion port; otherwise, false.

Remarks

For information about using native Win32 overlapped I/O, see the System.Threading.Overlapped class, the System.Threading.NativeOverlapped structure, and the OVERLAPPED structure in the Win32 Platform SDK.

Note:

Using the ThreadPool.UnsafeQueueNativeOverlapped(NativeOverlapped*) 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. When work is queued on a thread pool thread using ThreadPool.UnsafeQueueNativeOverlapped(NativeOverlapped*), 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.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0