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.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.Security.SecurityCritical>]
static member UnsafeQueueNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> bool

參數

overlapped
NativeOverlapped*

NativeOverlapped排隊的結構。

傳回

true若操作成功排隊至輸入輸出完成埠;否則,。 false

屬性

備註

關於如何使用原生 Win32 重疊 I/O 的資訊,請參閱 Overlapped Win32 平台 SDK 中的類別、 NativeOverlapped 結構 OVERLAPPED 與結構。

Caution

使用這種 UnsafeQueueNativeOverlapped 方法可能會無意中開啟安全漏洞。 程式碼存取安全性的權限檢查是基於堆疊中所有呼叫者的權限。 當工作在使用 UnsafeQueueNativeOverlapped的執行緒池執行緒上排隊時,該執行緒池執行緒的堆疊不會包含實際呼叫者的上下文。 惡意程式碼可能能利用這點來避開權限檢查。

適用於