|
76 | 76 | <summary>Gets the address of an exported symbol.</summary> |
77 | 77 | <returns>The address of the symbol.</returns> |
78 | 78 | <remarks> |
79 | | - <format type="text/markdown"><![CDATA[ |
| 79 | + <format type="text/markdown"><![CDATA[ |
80 | 80 |
|
81 | 81 | This is a simple wrapper around OS calls and does not perform any name mangling. |
82 | 82 |
|
| 83 | +Calling this method with an invalid `handle` parameter other than <xref:System.IntPtr.Zero?displayProperty=nameWithType> is not supported and will result in undefined behaviour. |
| 84 | +
|
83 | 85 | ]]></format> |
84 | 86 | </remarks> |
85 | 87 | <exception cref="T:System.ArgumentNullException"> |
86 | | - <paramref name="handle" /> or <paramref name="name" /> is <see langword="null" />.</exception> |
| 88 | + <paramref name="handle" /> is <see cref="F:System.IntPtr.Zero" /> or <paramref name="name" /> is <see langword="null" />.</exception> |
87 | 89 | <exception cref="T:System.EntryPointNotFoundException">The symbol is not found.</exception> |
88 | 90 | </Docs> |
89 | 91 | </Member> |
@@ -149,7 +151,7 @@ This is a simple wrapper around OS calls and does not perform any name mangling. |
149 | 151 | <summary>Provides a high-level API for loading a native library.</summary> |
150 | 152 | <returns>The OS handle for the loaded library.</returns> |
151 | 153 | <remarks> |
152 | | - <format type="text/markdown"><![CDATA[ |
| 154 | + <format type="text/markdown"><![CDATA[ |
153 | 155 |
|
154 | 156 | Given a library name, this method searches specific paths based on the runtime configuration, input parameters, and attributes of the calling assembly. If the `searchPath` parameter is non-null, the flags in this enumeration are used. Otherwise, the flags specified by the <xref:System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute> on the calling assembly, if any are present, are used. This method does not invoke the resolver registered using <xref:System.Runtime.InteropServices.NativeLibrary.SetDllImportResolver(System.Reflection.Assembly,System.Runtime.InteropServices.DllImportResolver)> |
155 | 157 | method. Starting with .NET 5, this method does invoke the <xref:System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDll%2A?displayProperty=nameWithType> method and the <xref:System.Runtime.Loader.AssemblyLoadContext.ResolvingUnmanagedDll?displayProperty=nameWithType> event. |
@@ -191,10 +193,10 @@ method. Starting with .NET 5, this method does invoke the <xref:System.Runtime.L |
191 | 193 | <param name="resolver">The resolver callback to register.</param> |
192 | 194 | <summary>Sets a callback for resolving native library imports from an assembly.</summary> |
193 | 195 | <remarks> |
194 | | - <format type="text/markdown"><![CDATA[ |
| 196 | + <format type="text/markdown"><![CDATA[ |
195 | 197 |
|
196 | 198 | This per-assembly resolver is the first attempt to resolve native library loads initiated by this assembly. |
197 | | - |
| 199 | +
|
198 | 200 | The callers of this method should register the resolver for their own assemblies only. |
199 | 201 |
|
200 | 202 | Only one resolver can be registered per assembly. Trying to register a second resolver fails with an <xref:System.InvalidOperationException>. |
@@ -235,10 +237,18 @@ Only one resolver can be registered per assembly. Trying to register a second re |
235 | 237 | <param name="address">When the method returns, contains the symbol address, if it exists.</param> |
236 | 238 | <summary>Gets the address of an exported symbol and returns a value that indicates whether the method call succeeded.</summary> |
237 | 239 | <returns> |
238 | | - <see langword="true" /> if the method returned successfully; otherwise, <see langword="false" />.</returns> |
239 | | - <remarks>To be added.</remarks> |
| 240 | + <see langword="true" /> if the address of the exported symbol was found successfully; otherwise, <see langword="false" />.</returns> |
| 241 | + <remarks> |
| 242 | + <format type="text/markdown"><![CDATA[ |
| 243 | +
|
| 244 | +This is a simple wrapper around OS calls and does not perform any name mangling. |
| 245 | +
|
| 246 | +Calling this method with a invalid `handle` parameter other than <xref:System.IntPtr.Zero?displayProperty=nameWithType> is not supported and will result in undefined behaviour. |
| 247 | +
|
| 248 | + ]]></format> |
| 249 | + </remarks> |
240 | 250 | <exception cref="T:System.ArgumentNullException"> |
241 | | - <paramref name="handle" /> or <paramref name="name" /> is <see langword="null" />.</exception> |
| 251 | + <paramref name="handle" /> is <see cref="F:System.IntPtr.Zero" /> or <paramref name="name" /> is <see langword="null" />.</exception> |
242 | 252 | </Docs> |
243 | 253 | </Member> |
244 | 254 | <Member MemberName="TryLoad"> |
@@ -268,7 +278,7 @@ Only one resolver can be registered per assembly. Trying to register a second re |
268 | 278 | <param name="handle">When the method returns, the OS handle of the loaded native library.</param> |
269 | 279 | <summary>Provides a simple API for loading a native library and returns a value that indicates whether the operation succeeded.</summary> |
270 | 280 | <returns> |
271 | | - <see langword="true" /> if the native library was loaded successful; otherwise, <see langword="false" />.</returns> |
| 281 | + <see langword="true" /> if the native library was loaded successfully; otherwise, <see langword="false" />.</returns> |
272 | 282 | <remarks>To be added.</remarks> |
273 | 283 | <exception cref="T:System.ArgumentNullException"> |
274 | 284 | <paramref name="libraryPath" /> is <see langword="null" />.</exception> |
@@ -305,7 +315,7 @@ Only one resolver can be registered per assembly. Trying to register a second re |
305 | 315 | <param name="handle">When the method returns, the OS handle of the loaded native library.</param> |
306 | 316 | <summary>Provides a high-level API that loads a native library and returns a value that indicates whether the operation succeeded.</summary> |
307 | 317 | <returns> |
308 | | - <see langword="true" /> if the load operation was successful; otherwise, <see langword="false" />.</returns> |
| 318 | + <see langword="true" /> if the native library was loaded successfully; otherwise, <see langword="false" />.</returns> |
309 | 319 | <remarks>To be added.</remarks> |
310 | 320 | <exception cref="T:System.ArgumentNullException"> |
311 | 321 | <paramref name="libraryPath" /> or <paramref name="assembly" /> is <see langword="null" />.</exception> |
|
0 commit comments