System.Runtime.InteropServices.DllImportAttribute Members

The members of System.Runtime.InteropServices.DllImportAttribute are listed below.

See Also: Inherited members from System.Attribute

Public Constructors

Initializes a new instance of the System.Runtime.InteropServices.DllImportAttribute class with the name of the DLL containing the method to import.

Public Fields

BestFitMappingbool.

Enables or disables best-fit mapping behavior when converting Unicode characters to ANSI characters.

CallingConventionCallingConvention.

Indicates the calling convention of an entry point.

CharSetCharSet.

Indicates how to marshal string parameters to the method and controls name mangling.

EntryPointstring.

Indicates the name or ordinal of the DLL entry point to be called.

ExactSpellingbool.

Controls whether the DllImportAttribute.CharSet field causes the common language runtime to search an unmanaged DLL for entry-point names other than the one specified.

PreserveSigbool.

Indicates whether unmanaged methods that have HRESULT or retval return values are directly translated or whether HRESULT or retval return values are automatically converted to exceptions.

SetLastErrorbool.

Indicates whether the callee calls the SetLastError Win32 API function before returning from the attributed method.

ThrowOnUnmappableCharbool.

Enables or disables the throwing of an exception on an unmappable Unicode character that is converted to an ANSI "?" character.

Public Properties

[read-only]
Valuestring.

Gets the name of the DLL file that contains the entry point.