This documentation is archived and is not being maintained.

ImportedFromTypeLibAttribute Class

Indicates that the types defined within an assembly were originally defined in a type library.

For a list of all members of this type, see ImportedFromTypeLibAttribute Members.

System.Object
   System.Attribute
      System.Runtime.InteropServices.ImportedFromTypeLibAttribute

[Visual Basic]
<AttributeUsage(AttributeTargets.Assembly)>
NotInheritable Public Class ImportedFromTypeLibAttribute
   Inherits Attribute
[C#]
[AttributeUsage(AttributeTargets.Assembly)]
public sealed class ImportedFromTypeLibAttribute : Attribute
[C++]
[AttributeUsage(AttributeTargets::Assembly)]
public __gc __sealed class ImportedFromTypeLibAttribute : public
   Attribute
[JScript]
public
   AttributeUsage(AttributeTargets.Assembly)
class ImportedFromTypeLibAttribute extends Attribute

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

You can apply this attribute to assemblies, although the Type Library Importer (Tlbimp.exe) typically applies it for you when it a type library.

The primary use of the attribute is to capture the original source of the type information. For example, you can import A.tlb as an interop assembly called A.dll and have assembly B.dll reference A.dll. When you export B.dll to B.tlb, this attribute causes the references in B.tlb that point to A.dll to point instead to A.tlb. This should not be confused with the ComImportAttribute, which specifies that an individual type is implemented in COM.

Requirements

Namespace: System.Runtime.InteropServices

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

ImportedFromTypeLibAttribute Members | System.Runtime.InteropServices Namespace | Type Library Importer (Tlbimp.exe) | ComImportAttribute

Show: