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 會匯出未裝飾名稱 (Undecorated Name)。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 匯出裝飾名稱 (Decorated Name)。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 匯入為 IUnknown 之型別的參考,如果該型別不具有已註冊的型別程式庫。Exports 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.

適用於