語言

ITypeLibConverter.ConvertTypeLibToAssembly 方法

定義

將 COM 型態函式庫轉換為組合語言。

多載

ConvertTypeLibToAssembly(Object, String, Int32, ITypeLibImporterNotifySink, Byte[], StrongNameKeyPair, Boolean)

將 COM 型態函式庫轉換為組合語言。

public:
 System::Reflection::Emit::AssemblyBuilder ^ ConvertTypeLibToAssembly(System::Object ^ typeLib, System::String ^ asmFileName, int flags, System::Runtime::InteropServices::ITypeLibImporterNotifySink ^ notifySink, cli::array <System::Byte> ^ publicKey, System::Reflection::StrongNameKeyPair ^ keyPair, bool unsafeInterfaces);
public System.Reflection.Emit.AssemblyBuilder ConvertTypeLibToAssembly(object typeLib, string asmFileName, int flags, System.Runtime.InteropServices.ITypeLibImporterNotifySink notifySink, byte[] publicKey, System.Reflection.StrongNameKeyPair keyPair, bool unsafeInterfaces);
abstract member ConvertTypeLibToAssembly : obj * string * int * System.Runtime.InteropServices.ITypeLibImporterNotifySink * byte[] * System.Reflection.StrongNameKeyPair * bool -> System.Reflection.Emit.AssemblyBuilder
Public Function ConvertTypeLibToAssembly (typeLib As Object, asmFileName As String, flags As Integer, notifySink As ITypeLibImporterNotifySink, publicKey As Byte(), keyPair As StrongNameKeyPair, unsafeInterfaces As Boolean) As AssemblyBuilder

參數

typeLib
Object

實作 ITypeLib 介面的物件。

asmFileName
String

產生的組裝檔名稱。

flags
Int32

一個 TypeLibImporterFlags 表示特殊設定的數值。

notifySink
ITypeLibImporterNotifySink

ITypeLibImporterNotifySink 由呼叫者實作的介面。

publicKey
Byte[]

一個 byte 包含公鑰的陣列。

keyPair
StrongNameKeyPair

包含 StrongNameKeyPair 公開與私密密碼金鑰對的物件。

unsafeInterfaces
Boolean

若 true,介面需進行連結時間檢查以取得 UnmanagedCode 權限。 若 false,介面需要執行時檢查,需進行堆疊行走且成本較高,但有助於提供更佳的保護。

傳回

一個 AssemblyBuilder 包含轉換後型別庫的物件。

備註

欲了解更多相關 ITypeLib資訊,請參閱 MSDN 圖書館中現有的文件。

適用於

ConvertTypeLibToAssembly(Object, String, TypeLibImporterFlags, ITypeLibImporterNotifySink, Byte[], StrongNameKeyPair, String, Version)

將 COM 型態函式庫轉換為組合語言。

public:
 System::Reflection::Emit::AssemblyBuilder ^ ConvertTypeLibToAssembly(System::Object ^ typeLib, System::String ^ asmFileName, System::Runtime::InteropServices::TypeLibImporterFlags flags, System::Runtime::InteropServices::ITypeLibImporterNotifySink ^ notifySink, cli::array <System::Byte> ^ publicKey, System::Reflection::StrongNameKeyPair ^ keyPair, System::String ^ asmNamespace, Version ^ asmVersion);
public System.Reflection.Emit.AssemblyBuilder ConvertTypeLibToAssembly(object typeLib, string asmFileName, System.Runtime.InteropServices.TypeLibImporterFlags flags, System.Runtime.InteropServices.ITypeLibImporterNotifySink notifySink, byte[] publicKey, System.Reflection.StrongNameKeyPair keyPair, string asmNamespace, Version asmVersion);
abstract member ConvertTypeLibToAssembly : obj * string * System.Runtime.InteropServices.TypeLibImporterFlags * System.Runtime.InteropServices.ITypeLibImporterNotifySink * byte[] * System.Reflection.StrongNameKeyPair * string * Version -> System.Reflection.Emit.AssemblyBuilder
Public Function ConvertTypeLibToAssembly (typeLib As Object, asmFileName As String, flags As TypeLibImporterFlags, notifySink As ITypeLibImporterNotifySink, publicKey As Byte(), keyPair As StrongNameKeyPair, asmNamespace As String, asmVersion As Version) As AssemblyBuilder

參數

typeLib
Object

實作 ITypeLib 介面的物件。

asmFileName
String

產生的組裝檔名稱。

flags
TypeLibImporterFlags

一個 TypeLibImporterFlags 表示特殊設定的數值。

notifySink
ITypeLibImporterNotifySink

ITypeLibImporterNotifySink 由呼叫者實作的介面。

publicKey
Byte[]

一個 byte 包含公鑰的陣列。

keyPair
StrongNameKeyPair

包含 StrongNameKeyPair 公開與私密密碼金鑰對的物件。

asmNamespace
String

這是最終組裝的命名空間。

asmVersion
Version

這是最終組裝的版本。 若 null,則使用型別庫的版本。

傳回

一個 AssemblyBuilder 包含轉換後型別庫的物件。

備註

欲了解更多相關 ITypeLib資訊,請參閱 MSDN 圖書館中現有的文件。

適用於