Skip to content

Commit 9654822

Browse files
Recommend LibraryImportAttribute in DllImportAttribute docs (#11772)
1 parent a397890 commit 9654822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Runtime.InteropServices/DllImportAttribute.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
The <xref:System.Runtime.InteropServices.DllImportAttribute> attribute provides the information needed to call a function exported from an unmanaged DLL. As a minimum requirement, you must supply the name of the DLL containing the entry point.
7575
7676
You apply this attribute directly to C# method definitions; however, the Visual Basic compiler emits this attribute when you use the `Declare` statement. For complex method definitions that include <xref:System.Runtime.InteropServices.DllImportAttribute.BestFitMapping>, <xref:System.Runtime.InteropServices.DllImportAttribute.CallingConvention>, <xref:System.Runtime.InteropServices.DllImportAttribute.ExactSpelling>, <xref:System.Runtime.InteropServices.DllImportAttribute.PreserveSig>, <xref:System.Runtime.InteropServices.DllImportAttribute.SetLastError>, or <xref:System.Runtime.InteropServices.DllImportAttribute.ThrowOnUnmappableChar> fields, you apply this attribute directly to Visual Basic method definitions.
77-
77+
Consider using the <xref:System.Runtime.InteropServices.LibraryImportAttribute> attribute instead.
7878
> [!NOTE]
7979
> JScript does not support this attribute. You can use C# or Visual Basic wrapper classes to access unmanaged API methods from JScript programs.
8080

0 commit comments

Comments
 (0)