Skip to content

Commit 0b86bf4

Browse files
authored
Fix links to native winapi docs in SafeHandle (#10283)
1 parent b465da4 commit 0b86bf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Runtime.InteropServices/SafeHandle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort
101101
]]></format>
102102
</example>
103103
<block subset="none" type="overrides">
104-
<para>To create a class derived from <see cref="T:System.Runtime.InteropServices.SafeHandle" />, you must know how to create and free an operating system handle. This process is different for different handle types because some use the [CloseHandle](/windows/win32/api/handleapi/nf-handleapi-closehandle) function, while others use more specific functions such as [UnmapViewOfFile](/windows/win32/api/memoryapi/nf-memoryapi-unmapviewoffile) or [FindClose](/windows/win32/api/fileapi/nf-fileapi-findclose). For this reason, you must create a derived class of <see cref="T:System.Runtime.InteropServices.SafeHandle" /> for each operating system handle type that you want to wrap in a safe handle.</para>
104+
<para>To create a class derived from <see cref="T:System.Runtime.InteropServices.SafeHandle" />, you must know how to create and free an operating system handle. This process is different for different handle types because some use the <see href="/windows/win32/api/handleapi/nf-handleapi-closehandle">CloseHandle</see> function, while others use more specific functions such as <see href="/windows/win32/api/memoryapi/nf-memoryapi-unmapviewoffile">UnmapViewOfFile</see> or <see href="/windows/win32/api/fileapi/nf-fileapi-findclose">FindClose</see>. For this reason, you must create a derived class of <see cref="T:System.Runtime.InteropServices.SafeHandle" /> for each operating system handle type that you want to wrap in a safe handle.</para>
105105
<para>When you inherit from <see cref="T:System.Runtime.InteropServices.SafeHandle" />, you must override the following members: <see cref="P:System.Runtime.InteropServices.SafeHandle.IsInvalid" /> and <see cref="M:System.Runtime.InteropServices.SafeHandle.ReleaseHandle" />.</para>
106106
<para>You should also provide a public parameterless constructor that calls the base constructor with a value that represents an invalid handle value, and a <see cref="T:System.Boolean" /> value indicating whether the native handle is owned by the <see cref="T:System.Runtime.InteropServices.SafeHandle" /> and consequently should be freed when that <see cref="T:System.Runtime.InteropServices.SafeHandle" /> has been disposed.</para>
107107
</block>

0 commit comments

Comments
 (0)