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 扩展方法。