Szerkesztés

Megosztás a következőn keresztül:


ITypeLibConverter.ConvertTypeLibToAssembly Method

Definition

Converts a COM type library to an assembly.

Overloads

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

Converts a COM type library to an assembly.

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

Converts a COM type library to an assembly.

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

Converts a COM type library to an assembly.

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

Parameters

typeLib
Object

The object that implements the ITypeLib interface.

asmFileName
String

The file name of the resulting assembly.

flags
Int32

A TypeLibImporterFlags value indicating any special settings.

notifySink
ITypeLibImporterNotifySink

ITypeLibImporterNotifySink interface implemented by the caller.

publicKey
Byte[]

A byte array containing the public key.

keyPair
StrongNameKeyPair

A StrongNameKeyPair object containing the public and private cryptographic key pair.

unsafeInterfaces
Boolean

If true, the interfaces require link time checks for UnmanagedCode permission. If false, the interfaces require run time checks that require a stack walk and are more expensive, but help provide greater protection.

Returns

An AssemblyBuilder object containing the converted type library.

Remarks

For more information on ITypeLib, please see its existing documentation in the MSDN library.

Applies to

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

Converts a COM type library to an assembly.

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

Parameters

typeLib
Object

The object that implements the ITypeLib interface.

asmFileName
String

The file name of the resulting assembly.

flags
TypeLibImporterFlags

A TypeLibImporterFlags value indicating any special settings.

notifySink
ITypeLibImporterNotifySink

ITypeLibImporterNotifySink interface implemented by the caller.

publicKey
Byte[]

A byte array containing the public key.

keyPair
StrongNameKeyPair

A StrongNameKeyPair object containing the public and private cryptographic key pair.

asmNamespace
String

The namespace for the resulting assembly.

asmVersion
Version

The version of the resulting assembly. If null, the version of the type library is used.

Returns

An AssemblyBuilder object containing the converted type library.

Remarks

For more information on ITypeLib, please see its existing documentation in the MSDN library.

Applies to