WaitHandleExtensions.SetSafeWaitHandle(WaitHandle, SafeWaitHandle) WaitHandleExtensions.SetSafeWaitHandle(WaitHandle, SafeWaitHandle) WaitHandleExtensions.SetSafeWaitHandle(WaitHandle, SafeWaitHandle) Method

定義

設定原生作業系統等候控制代碼的安全控制代碼。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);
static member SetSafeWaitHandle : System.Threading.WaitHandle * Microsoft.Win32.SafeHandles.SafeWaitHandle -> unit

參數

waitHandle
WaitHandle WaitHandle WaitHandle

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

value
SafeWaitHandle SafeWaitHandle 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.

適用於