This documentation is archived and is not being maintained.

DllImportAttribute Members

DllImportAttribute overview

Public Constructors

public constructorDllImportAttribute Constructor

Supported by the .NET Compact Framework.

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

Public Fields

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

Supported by the .NET Compact Framework.

Indicates the calling convention of an entry point.
public fieldCharSet

Supported by the .NET Compact Framework.

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

Supported by the .NET Compact Framework.

Indicates the name or ordinal of the DLL entry point to be called.
public fieldExactSpelling 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.
public fieldPreserveSig Indicates whether the signature is a direct translation of the unmanaged entry point.
public fieldSetLastError

Supported by the .NET Compact Framework.

Indicates whether the callee calls the SetLastError Win32 API function before returning from the attributed method.
public fieldThrowOnUnmappableChar Enables or disables the throwing of an exception on an unmappable Unicode character that is converted to an ANSI '?' character.

Public Properties

public propertyTypeId (inherited from Attribute) When implemented in a derived class, gets a unique identifier for this Attribute.
public propertyValue

Supported by the .NET Compact Framework.

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

Public Methods

public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodGetHashCode (inherited from Attribute)

Supported by the .NET Compact Framework.

Overridden. Returns the hash code for this instance.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodIsDefaultAttribute (inherited from Attribute) When overridden in a derived class, returns an indication whether the value of this instance is the default value for the derived class.
public methodMatch (inherited from Attribute)

Supported by the .NET Compact Framework.

When overridden in a derived class, returns a value indicating whether this instance equals a specified object.
public methodToString (inherited from Object)

Supported by the .NET Compact Framework.

Returns a String that represents the current Object.

Protected Methods

protected methodFinalize (inherited from Object)

Supported by the .NET Compact Framework.

Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

DllImportAttribute Class | System.Runtime.InteropServices Namespace

Show: