共用方式為


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 線上程集區執行緒上排入工作佇列時,執行緒集區執行緒的堆疊沒有實際呼叫端的內容。 惡意程式碼可能會遭到惡意探索,以避免許可權檢查。

適用於