Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Runtime.​InteropServices.​DllImportAttribute
Assembly: System.Runtime.InteropServices
Inheritance: object → Attribute → DllImportAttribute
Indicates that the attributed method is exposed by an unmanaged dynamic-link library (DLL) as a static entry point.
Fields and Constants
public
bool
BestFitMapping
Enables or disables best-fit mapping behavior when converting Unicode characters to ANSI characters.
public
CallingConvention
CallingConvention
Indicates the calling convention of an entry point.
public
CharSet
CharSet
Indicates how to marshal string parameters to the method and controls name mangling.
public
string
EntryPoint
Indicates the name or ordinal of the DLL entry point to be called.
public
bool
ExactSpelling
Controls whether the <see cref="F:System.Runtime.InteropServices.DllImportAttribute.CharSet" /> field causes the common language runtime to search an unmanaged DLL for entry-point names other than the one specified.
public
bool
PreserveSig
Indicates whether unmanaged methods that have <see langword="HRESULT" /> return values are directly translated or whether <see langword="HRESULT" /> return values are automatically converted to exceptions.
public
bool
SetLastError
Indicates whether the callee sets an error ( <see langword="SetLastError" /> on Windows or <see langword="errno" /> on other platforms) before returning from the attributed method.
public
bool
ThrowOnUnmappableChar
Enables or disables the throwing of an exception on an unmappable Unicode character that is converted to an ANSI "?" character.
Properties
public
string
Value
Gets the name of the DLL file that contains the entry point.
public
object
TypeId
Methods
protected
void
Finalize​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object