Editar

Compartir a través de


WaitHandleExtensions.SetSafeWaitHandle(WaitHandle, SafeWaitHandle) Method

Definition

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)

Parameters

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.

Attributes

Exceptions

waitHandle is null.

Remarks

SetSafeWaitHandle is an extension method that is equivalent to assigning a value to the WaitHandle.SafeWaitHandle property.

Applies to