WaitHandleExtensions.SetSafeWaitHandle(WaitHandle, SafeWaitHandle) 方法

定義

設定原生作業系統等候控制代碼的安全控制代碼。Sets a safe handle for a native operating system wait handle.

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

將等候共用資源獨佔存取權的特定作業系統物件封裝起來的等候控制代碼。A wait handle that encapsulates an operating system-specific object that waits for exclusive access to a shared resource.

value
SafeWaitHandle

包裝作業系統控制代碼的安全控制代碼。The safe handle to wrap the operating system handle.

屬性

例外狀況

waitHandlenullwaitHandle is null.

備註

SetSafeWaitHandle 是擴充方法,相當於將值指派給 WaitHandle.SafeWaitHandle 屬性。SetSafeWaitHandle is an extension method that is equivalent to assigning a value to the WaitHandle.SafeWaitHandle property.

適用於