TypeLibImporterFlags 枚举

定义

指示应该如何生成程序集。Indicates how an assembly should be produced.

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

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

字段

ImportAsAgnostic 2048

导入任何平台的类型库。Imports a type library for any platform.

ImportAsArm 16384

导入 ARM 平台的库。Imports a library for the ARM platform.

ImportAsItanium 1024

导入 Itanium 平台的类型库。Imports a type library for the Itanium platform.

ImportAsX64 512

导入 x86 64 位平台的类型库。Imports a type library for the x86 64-bit platform.

ImportAsX86 256

导入 x86 平台的类型库。Imports a type library for the x86 platform.

NoDefineVersionResource 8192

防止将版本资源包含在互操作程序集中。Prevents inclusion of a version resource in the interop assembly. 有关更多信息,请参见 DefineVersionInfoResource() 方法。For more information, see the DefineVersionInfoResource() method.

None 0

没有特殊设置。No special settings. 这是默认设置。This is the default.

PreventClassMembers 16

未使用。Not used.

PrimaryInteropAssembly 1

生成主互操作程序集。Generates a primary interop assembly. 有关更多信息,请参见 PrimaryInteropAssemblyAttribute 属性。For more information, see the PrimaryInteropAssemblyAttribute attribute. 必须指定密钥文件。A keyfile must be specified.

ReflectionOnlyLoading 4096

使用只反射加载。Uses reflection-only loading.

SafeArrayAsSystemArray 4

将所有 SAFEARRAY 实例导入为 Array,而不是类型化的、一维的、从零开始的托管数组。Imports all SAFEARRAY instances as Array instead of typed, single-dimensional, zero-based managed arrays. 此选项可用于处理多维的、非从零开始的 SAFEARRAY 实例,除非使用 MSIL 反汇编程序 (Ildasm.exe) 和 MSIL 汇编程序 (Ilasm.exe) 工具编辑结果程序集,否则将无法访问这些数组。This option is useful when dealing with multi-dimensional, non-zero-based SAFEARRAY instances, which otherwise cannot be accessed unless you edit the resulting assembly by using the MSIL Disassembler (Ildasm.exe) and MSIL Assembler (Ilasm.exe) tools.

SerializableValueClasses 32

使用可序列化的类。Uses serializable classes.

TransformDispRetVals 8

将仅支持调度的接口 (dispinterface) 上的方法的 [out, retval] 参数转换为返回值。Transforms [out, retval] parameters of methods on dispatch-only interfaces (dispinterface) into return values.

UnsafeInterfaces 2

将所有接口导入为取消公共语言运行时为 UnmanagedCode 权限所进行的堆栈爬行遍历的接口。Imports all interfaces as interfaces that suppress the common language runtime's stack crawl for UnmanagedCode permission. 你一定要理解与取消该安全检查关联的责任。Be sure you understand the responsibilities associated with suppressing this security check.

注解

此枚举与TypeLibConverter.ConvertTypeLibToAssembly方法一起使用。This enumeration is used with the TypeLibConverter.ConvertTypeLibToAssembly method.

适用于