Skip to content

Fix a doc details about loading Native DLLs #3310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions xml/System.Runtime.InteropServices/NativeLibrary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<Parameter Name="handle" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="handle">The native library handle to be freed.</param>
<summary>Frees a given a loaded library handle, or takes no action if the input handle is <see cref="F:System.IntPtr.Zero" />.</summary>
<param name="handle">The native library OS handle to be freed.</param>
<summary>Frees a loaded library with the specified OS handle, or takes no action if the input handle is <see cref="F:System.IntPtr.Zero" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand All @@ -62,7 +62,7 @@
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="handle">The native library handle.</param>
<param name="handle">The native library OS handle.</param>
<param name="name">The name of the exported symbol.</param>
<summary>Gets the address of an exported symbol.</summary>
<returns>The address of the symbol.</returns>
Expand Down Expand Up @@ -99,7 +99,7 @@ This is a simple wrapper around OS calls and does not perform any name mangling.
<Docs>
<param name="libraryPath">The name of the native library to be loaded.</param>
<summary>Provides a simple API for loading a native library that wraps the OS loader and uses default flags.</summary>
<returns>The handle for the loaded native library.</returns>
<returns>The OS handle for the loaded native library.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="libraryPath" /> is <see langword="null" />.</exception>
Expand Down Expand Up @@ -131,7 +131,7 @@ This is a simple wrapper around OS calls and does not perform any name mangling.
<param name="assembly">The assembly loading the native library.</param>
<param name="searchPath">The search path.</param>
<summary>Provides a high-level API for loading a native library.</summary>
<returns>The handle for the loaded library.</returns>
<returns>The OS handle for the loaded library.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -208,7 +208,7 @@ Only one resolver can be registered per assembly. Trying to register a second re
<Parameter Name="address" Type="System.IntPtr" RefType="out" />
</Parameters>
<Docs>
<param name="handle">The native library handle.</param>
<param name="handle">The native library OS handle.</param>
<param name="name">The name of the exported symbol.</param>
<param name="address">When the method returns, contains the symbol address, if it exists.</param>
<summary>Gets the address of an exported symbol and returns a value that indicates whether the method call succeeded.</summary>
Expand Down Expand Up @@ -240,7 +240,7 @@ Only one resolver can be registered per assembly. Trying to register a second re
</Parameters>
<Docs>
<param name="libraryPath">The name of the native library to be loaded.</param>
<param name="handle">When the method returns, the handle of the loaded native library.</param>
<param name="handle">When the method returns, the OS handle of the loaded native library.</param>
<summary>Provides a simple API for loading a native library and returns a value that indicates whether the operation succeeded.</summary>
<returns>
<see langword="true" /> if the native library was loaded successful; otherwise, <see langword="false" />.</returns>
Expand Down Expand Up @@ -273,7 +273,7 @@ Only one resolver can be registered per assembly. Trying to register a second re
<param name="libraryName">The name of the native library to be loaded.</param>
<param name="assembly">The assembly loading the native library.</param>
<param name="searchPath">The search path.</param>
<param name="handle">When the method returns, the handle of the loaded native library.</param>
<param name="handle">When the method returns, the OS handle of the loaded native library.</param>
<summary>Provides a high-level API that loads a native library and returns a value that indicates whether the operation succeeded.</summary>
<returns>
<see langword="true" /> if the load operation was successful; otherwise, <see langword="false" />.</returns>
Expand Down
15 changes: 11 additions & 4 deletions xml/System.Runtime.Loader/AssemblyLoadContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -774,12 +774,19 @@ Each <xref:System.Runtime.Loader.AssemblyLoadContext> can load only:
<Docs>
<param name="unmanagedDllPath">The path to the unmanaged library.</param>
<summary>Loads an unmanaged library from the specified path.</summary>
<returns>A handle to the loaded library.</returns>
<remarks>To be added.</remarks>
<returns>The OS handle for the loaded native library.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

The OS handle returned by this method can be used with methods of the <xref:System.Runtime.InteropServices.NativeLibrary?displayProperty=nameWithType> class.

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="unmanagedDllPath" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">The <paramref name="unmanagedDllPath" /> argument is not an absolute path.</exception>
<exception cref="T:System.IO.FileNotFoundException">The unmanaged library cannot be found.</exception>
<exception cref="T:System.ArgumentException">The <paramref name="unmanagedDllPath" /> argument is empty or not an absolute path.</exception>
<exception cref="T:System.DllNotFoundException">The library can't be found.</exception>
<exception cref="T:System.BadImageFormatException">The library is not valid.</exception>
</Docs>
</Member>
<Member MemberName="Name">
Expand Down