TypeLibExporterFlags 枚举

定义

指示应该如何生成类型库。Indicates how a type library should be produced.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class TypeLibExporterFlags
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum TypeLibExporterFlags
type TypeLibExporterFlags = 
Public Enum TypeLibExporterFlags
继承
TypeLibExporterFlags
属性

字段

CallerResolvedReferences 2

允许调用方无需参考注册表便可显式解析类型库引用。Allows the caller to explicitly resolve type library references without consulting the registry.

ExportAs32Bit 16

在 64 位计算机上编译时,指定类型库导出程序 (Tlbexp.exe) 生成一个 32 位的类型库。When compiling on a 64-bit computer, specifies that the Type Library Exporter (Tlbexp.exe) generates a 32-bit type library. 所有数据类型都将进行相应转换。All data types are transformed appropriately.

ExportAs64Bit 32

在 32 位计算机上编译时,指定类型库导出程序 (Tlbexp.exe) 生成一个 64 位的类型库。When compiling on a 32-bit computer, specifies that the Type Library Exporter (Tlbexp.exe) generates a 64-bit type library. 所有数据类型都将进行相应转换。All data types are transformed appropriately.

None 0

不指定任何标志。Specifies no flags. 这是默认设置。This is the default.

OldNames 4

导出类型库时,.NET Framework 通过使用命名空间的名称修饰类型来解决类型名称冲突;例如,System.Windows.Forms.HorizontalAlignment 导出为 System_Windows_Forms_HorizontalAlignmentWhen exporting type libraries, the .NET Framework resolves type name conflicts by decorating the type with the name of the namespace; for example, System.Windows.Forms.HorizontalAlignment is exported as System_Windows_Forms_HorizontalAlignment. 如果与在 COM 不可见的类型的名称有冲突,则 .NET Framework 导出未经修饰的名称。When there is a conflict with the name of a type that is not visible from COM, the .NET Framework exports the undecorated name. 设置 OldNames 标志或使用类型库导出程序 (Tlbexp.exe) 中的 /oldnames 选项来强制 .NET Framework 导出修饰过的名称。Set the OldNames flag or use the /oldnames option in the Type Library Exporter (Tlbexp.exe) to force the .NET Framework to export the decorated name. 注意,在 .NET Framework 2.0 版之前的版本中,导出修饰过的名称是默认行为。Note that exporting the decorated name was the default behavior in versions prior to the .NET Framework version 2.0.

OnlyReferenceRegistered 1

如果从 COM 导入的类型没有注册的类型库,则将对此类型的引用导出为 IUnknownExports references to types that were imported from COM as IUnknown if the type does not have a registered type library. 如果要让类型库导出程序在注册表中而不是在与输入程序集相同的目录中查找依赖类型,则设置此标志。Set this flag when you want the type library exporter to look for dependent types in the registry rather than in the same directory as the input assembly.

注解

ConvertAssemblyToTypeLib一起使用。Used with ConvertAssemblyToTypeLib.

适用于