共用方式為


WaitHandleExtensions.SetSafeWaitHandle(WaitHandle, SafeWaitHandle) 方法

定義

設定原生作業系統等候控制代碼的安全控制代碼。

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

包裝作業系統控制代碼的安全控制代碼。

屬性

例外狀況

waitHandlenull

備註

SetSafeWaitHandle 是相當於將值指派給 屬性的 WaitHandle.SafeWaitHandle 擴充方法。

適用於