WaitHandleExtensions.SetSafeWaitHandle(WaitHandle, SafeWaitHandle) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定原生作業系統等候控制代碼的安全控制代碼。
public:
[System::Runtime::CompilerServices::Extension]
static void SetSafeWaitHandle(System::Threading::WaitHandle ^ waitHandle, Microsoft::Win32::SafeHandles::SafeWaitHandle ^ value);
[System.Security.SecurityCritical]
public static void SetSafeWaitHandle (this System.Threading.WaitHandle waitHandle, Microsoft.Win32.SafeHandles.SafeWaitHandle value);
public static void SetSafeWaitHandle (this System.Threading.WaitHandle waitHandle, Microsoft.Win32.SafeHandles.SafeWaitHandle? value);
public static void SetSafeWaitHandle (this System.Threading.WaitHandle waitHandle, Microsoft.Win32.SafeHandles.SafeWaitHandle value);
[<System.Security.SecurityCritical>]
static member SetSafeWaitHandle : System.Threading.WaitHandle * Microsoft.Win32.SafeHandles.SafeWaitHandle -> unit
static member SetSafeWaitHandle : System.Threading.WaitHandle * Microsoft.Win32.SafeHandles.SafeWaitHandle -> unit
<Extension()>
Public Sub SetSafeWaitHandle (waitHandle As WaitHandle, value As SafeWaitHandle)
參數
- waitHandle
- WaitHandle
將等候共用資源獨佔存取權的特定作業系統物件封裝起來的等候控制代碼。
- value
- SafeWaitHandle
包裝作業系統控制代碼的安全控制代碼。
- 屬性
例外狀況
waitHandle
為 null
。
備註
SetSafeWaitHandle 是相當於將值指派給 屬性的 WaitHandle.SafeWaitHandle 擴充方法。