1 <?xml version="1.0" encoding="utf-8"?><span>
4 <name>System.Runtime.Handles</name>
7 <member name="T:System.IO.HandleInheritability">
8 <summary>Specifies whether the underlying handle is inheritable by child processes.</summary>
10 <member name="F:System.IO.HandleInheritability.Inheritable">
11 <summary>Specifies that the handle is inheritable by child processes.</summary>
14 <member name="F:System.IO.HandleInheritability.None">
15 <summary>Specifies that the handle is not inheritable by child processes.</summary>
18 <member name="T:System.Threading.WaitHandleExtensions">
19 <summary>Provides convenience methods to for working with a safe handle for a wait handle.</summary>
21 <member name="M:System.Threading.WaitHandleExtensions.GetSafeWaitHandle(System.Threading.WaitHandle)">
22 <summary>Gets the safe handle for a native operating system wait handle.</summary>
23 <param name="waitHandle">A native operating system handle.</param>
24 <returns>The safe wait handle that wraps the native operating system wait handle.</returns>
25 <exception cref="T:System.ArgumentNullException"><paramref name="waitHandle">waitHandle</paramref> is null.</exception>
27 <member name="M:System.Threading.WaitHandleExtensions.SetSafeWaitHandle(System.Threading.WaitHandle,Microsoft.Win32.SafeHandles.SafeWaitHandle)">
28 <summary>Sets a safe handle for a native operating system wait handle.</summary>
29 <param name="waitHandle">A wait handle that encapsulates an operating system-specific object that waits for exclusive access to a shared resource.</param>
30 <param name="value">The safe handle to wrap the operating system handle.</param>
31 <exception cref="T:System.ArgumentNullException"><paramref name="waitHandle">waitHandle</paramref> is null.</exception>
33 <member name="T:Microsoft.Win32.SafeHandles.SafeWaitHandle">
34 <summary>Represents a wrapper class for a wait handle.</summary>
36 <member name="M:Microsoft.Win32.SafeHandles.SafeWaitHandle.#ctor(System.IntPtr,System.Boolean)">
37 <summary>Initializes a new instance of the <see cref="T:Microsoft.Win32.SafeHandles.SafeWaitHandle"></see> class.</summary>
38 <param name="existingHandle">An <see cref="T:System.IntPtr"></see> object that represents the pre-existing handle to use.</param>
39 <param name="ownsHandle">true to reliably release the handle during the finalization phase; false to prevent reliable release (not recommended).</param>
41 <member name="P:Microsoft.Win32.SafeHandles.SafeWaitHandle.IsInvalid">
44 <member name="T:System.Runtime.InteropServices.CriticalHandle">
45 <summary>Represents a wrapper class for handle resources.</summary>
47 <member name="M:System.Runtime.InteropServices.CriticalHandle.#ctor(System.IntPtr)">
48 <summary>Initializes a new instance of the <see cref="T:System.Runtime.InteropServices.CriticalHandle"></see> class with the specified invalid handle value.</summary>
49 <param name="invalidHandleValue">The value of an invalid handle (usually 0 or -1).</param>
50 <exception cref="T:System.TypeLoadException">The derived class resides in an assembly without unmanaged code access permission.</exception>
52 <member name="M:System.Runtime.InteropServices.CriticalHandle.Dispose">
53 <summary>Releases all resources used by the <see cref="T:System.Runtime.InteropServices.CriticalHandle"></see>.</summary>
55 <member name="M:System.Runtime.InteropServices.CriticalHandle.Dispose(System.Boolean)">
56 <summary>Releases the unmanaged resources used by the <see cref="T:System.Runtime.InteropServices.CriticalHandle"></see> class specifying whether to perform a normal dispose operation.</summary>
57 <param name="disposing">true for a normal dispose operation; false to finalize the handle.</param>
59 <member name="M:System.Runtime.InteropServices.CriticalHandle.Finalize">
60 <summary>Frees all resources associated with the handle.</summary>
62 <member name="F:System.Runtime.InteropServices.CriticalHandle.handle">
63 <summary>Specifies the handle to be wrapped.</summary>
66 <member name="P:System.Runtime.InteropServices.CriticalHandle.IsClosed">
67 <summary>Gets a value indicating whether the handle is closed.</summary>
68 <returns>true if the handle is closed; otherwise, false.</returns>
70 <member name="P:System.Runtime.InteropServices.CriticalHandle.IsInvalid">
71 <summary>When overridden in a derived class, gets a value indicating whether the handle value is invalid.</summary>
72 <returns>true if the handle is valid; otherwise, false.</returns>
74 <member name="M:System.Runtime.InteropServices.CriticalHandle.ReleaseHandle">
75 <summary>When overridden in a derived class, executes the code required to free the handle.</summary>
76 <returns>true if the handle is released successfully; otherwise, in the event of a catastrophic failure, false. In this case, it generates a <see cref="~/docs/framework/debug-trace-profile/releasehandlefailed-mda.md">releaseHandleFailed</see> Managed Debugging Assistant.</returns>
78 <member name="M:System.Runtime.InteropServices.CriticalHandle.SetHandle(System.IntPtr)">
79 <summary>Sets the handle to the specified pre-existing handle.</summary>
80 <param name="handle">The pre-existing handle to use.</param>
82 <member name="M:System.Runtime.InteropServices.CriticalHandle.SetHandleAsInvalid">
83 <summary>Marks a handle as invalid.</summary>
85 <member name="T:System.Runtime.InteropServices.SafeHandle">
86 <summary>Represents a wrapper class for operating system handles. This class must be inherited.</summary>
88 <member name="M:System.Runtime.InteropServices.SafeHandle.#ctor(System.IntPtr,System.Boolean)">
89 <summary>Initializes a new instance of the <see cref="T:System.Runtime.InteropServices.SafeHandle"></see> class with the specified invalid handle value.</summary>
90 <param name="invalidHandleValue">The value of an invalid handle (usually 0 or -1). Your implementation of <see cref="P:System.Runtime.InteropServices.SafeHandle.IsInvalid"></see> should return true for this value.</param>
91 <param name="ownsHandle">true to reliably let <see cref="T:System.Runtime.InteropServices.SafeHandle"></see> release the handle during the finalization phase; otherwise, false (not recommended).</param>
92 <exception cref="T:System.TypeLoadException">The derived class resides in an assembly without unmanaged code access permission.</exception>
94 <member name="M:System.Runtime.InteropServices.SafeHandle.DangerousAddRef(System.Boolean@)">
95 <summary>Manually increments the reference counter on <see cref="T:System.Runtime.InteropServices.SafeHandle"></see> instances.</summary>
96 <param name="success">true if the reference counter was successfully incremented; otherwise, false.</param>
98 <member name="M:System.Runtime.InteropServices.SafeHandle.DangerousGetHandle">
99 <summary>Returns the value of the <see cref="F:System.Runtime.InteropServices.SafeHandle.handle"></see> field.</summary>
100 <returns>An IntPtr representing the value of the <see cref="F:System.Runtime.InteropServices.SafeHandle.handle"></see> field. If the handle has been marked invalid with <see cref="M:System.Runtime.InteropServices.SafeHandle.SetHandleAsInvalid"></see>, this method still returns the original handle value, which can be a stale value.</returns>
102 <member name="M:System.Runtime.InteropServices.SafeHandle.DangerousRelease">
103 <summary>Manually decrements the reference counter on a <see cref="T:System.Runtime.InteropServices.SafeHandle"></see> instance.</summary>
105 <member name="M:System.Runtime.InteropServices.SafeHandle.Dispose">
106 <summary>Releases all resources used by the <see cref="T:System.Runtime.InteropServices.SafeHandle"></see> class.</summary>
108 <member name="M:System.Runtime.InteropServices.SafeHandle.Dispose(System.Boolean)">
109 <summary>Releases the unmanaged resources used by the <see cref="T:System.Runtime.InteropServices.SafeHandle"></see> class specifying whether to perform a normal dispose operation.</summary>
110 <param name="disposing">true for a normal dispose operation; false to finalize the handle.</param>
112 <member name="M:System.Runtime.InteropServices.SafeHandle.Finalize">
113 <summary>Frees all resources associated with the handle.</summary>
115 <member name="F:System.Runtime.InteropServices.SafeHandle.handle">
116 <summary>Specifies the handle to be wrapped.</summary>
119 <member name="P:System.Runtime.InteropServices.SafeHandle.IsClosed">
120 <summary>Gets a value indicating whether the handle is closed.</summary>
121 <returns>true if the handle is closed; otherwise, false.</returns>
123 <member name="P:System.Runtime.InteropServices.SafeHandle.IsInvalid">
124 <summary>When overridden in a derived class, gets a value indicating whether the handle value is invalid.</summary>
125 <returns>true if the handle value is invalid; otherwise, false.</returns>
127 <member name="M:System.Runtime.InteropServices.SafeHandle.ReleaseHandle">
128 <summary>When overridden in a derived class, executes the code required to free the handle.</summary>
129 <returns>true if the handle is released successfully; otherwise, in the event of a catastrophic failure, false. In this case, it generates a <see cref="~/docs/framework/debug-trace-profile/releasehandlefailed-mda.md">releaseHandleFailed</see> Managed Debugging Assistant.</returns>
131 <member name="M:System.Runtime.InteropServices.SafeHandle.SetHandle(System.IntPtr)">
132 <summary>Sets the handle to the specified pre-existing handle.</summary>
133 <param name="handle">The pre-existing handle to use.</param>
135 <member name="M:System.Runtime.InteropServices.SafeHandle.SetHandleAsInvalid">
136 <summary>Marks a handle as no longer used.</summary>