SafeWaitHandle Constructor (IntPtr, Boolean)
.NET Framework (current version)
Initializes a new instance of the SafeWaitHandle class.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- existingHandle
-
Type:
System::IntPtr
An IntPtr object that represents the pre-existing handle to use.
- ownsHandle
-
Type:
System::Boolean
true to reliably release the handle during the finalization phase; false to prevent reliable release (not recommended).
The following code example demonstrates how to use interop to create a mutex using the SafeWaitHandle class and the unmanaged CreateMutex function.
SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 10
.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: