RegistrationHelper.InstallAssembly メソッド

定義

COM+ カタログで使用できるランタイム コンポーネントを提供します。

オーバーロード

InstallAssembly(String, String, String, InstallationFlags)

名前付きアセンブリを COM+ アプリケーションにインストールします。

InstallAssembly(String, String, String, String, InstallationFlags)

名前付きアセンブリを COM+ アプリケーションにインストールします。

InstallAssembly(String, String, String, InstallationFlags)

名前付きアセンブリを COM+ アプリケーションにインストールします。

public:
 virtual void InstallAssembly(System::String ^ assembly, System::String ^ % application, System::String ^ % tlb, System::EnterpriseServices::InstallationFlags installFlags);
public void InstallAssembly (string assembly, ref string application, ref string tlb, System.EnterpriseServices.InstallationFlags installFlags);
abstract member InstallAssembly : string * string * string * System.EnterpriseServices.InstallationFlags -> unit
override this.InstallAssembly : string * string * string * System.EnterpriseServices.InstallationFlags -> unit
Public Sub InstallAssembly (assembly As String, ByRef application As String, ByRef tlb As String, installFlags As InstallationFlags)

パラメーター

assembly
String

インストールするアセンブリのファイル名。

application
String

インストール先の COM+ アプリケーションの名前。 このパラメーターは、null に設定できます。 パラメーターが null で、アセンブリに ApplicationNameAttribute が格納されている場合は、この属性が使用されます。 それ以外の場合は、アセンブリの名前に基づいたアプリケーションの名前が生成されて返されます。

tlb
String

タイプ ライブラリ エクスポーター (Tlbexp.exe) 出力ファイルの名前。または、登録ヘルパーがその名前を生成することになっている場合は null を含んでいる文字列。 呼び出しが完了すると、使用された実際の名前がパラメーターに配置されます。

installFlags
InstallationFlags

InstallationFlags 値のビットごとの組み合わせ。

実装

例外

入力アセンブリには厳密な名前がありません。

次のコード例は、 メソッドを使用 InstalAssembly して、COM+ アプリケーションに名前付きアセンブリをインストールする方法を示しています。

String^ applicationName = "Queued Component";
String^ typeLibraryName = nullptr;
RegistrationHelper^ helper = gcnew RegistrationHelper;
// Call the InstallAssembly method passing it the name of the assembly to 
// install as a COM+ application, the COM+ application name, and 
// the name of the type library file.
// Setting the application name and the type library to NULL (nothing in Visual Basic .NET
// allows you to use the COM+ application name that is given in the assembly and 
// the default type library name. The application name in the assembly metadata 
// takes precedence over the application name you provide to InstallAssembly. 
helper->InstallAssembly( "C:..\\..\\QueuedComponent.dll",  applicationName,  typeLibraryName, InstallationFlags::CreateTargetApplication );
Console::WriteLine( "Registration succeeded: Type library {0} created.", typeLibraryName );
Console::Read();
string applicationName = "Queued Component";			
string typeLibraryName = null;
RegistrationHelper helper = new RegistrationHelper();
// Call the InstallAssembly method passing it the name of the assembly to
// install as a COM+ application, the COM+ application name, and
// the name of the type library file.
// Setting the application name and the type library to NULL (nothing in Visual Basic .NET
// allows you to use the COM+ application name that is given in the assembly and
// the default type library name. The application name in the assembly metadata
// takes precedence over the application name you provide to InstallAssembly.
helper.InstallAssembly(@"C:..\..\QueuedComponent.dll", ref applicationName, ref typeLibraryName, InstallationFlags.CreateTargetApplication);
Console.WriteLine("Registration succeeded: Type library {0} created.", typeLibraryName);
Console.Read();
Dim applicationName As String = "Queued Component"
Dim typeLibraryName As String = Nothing
Dim helper As New RegistrationHelper

' Call the InstallAssembly method passing it the name of the assembly to 
' install as a COM+ application, the COM+ application name, and 
' the name of the type library file.
' Setting the application name and the type library to NULL (nothing in Visual Basic .NET
' allows you to use the COM+ application name that is given in the assembly and 
' the default type library name. The application name in the assembly metadata 
' takes precedence over the application name you provide to InstallAssembly. 
helper.InstallAssembly("C:..\..\QueuedComponent.dll", applicationName, typeLibraryName, InstallationFlags.CreateTargetApplication)
MsgBox("Registration succeeded: Type library " & typeLibraryName & " created.")
Console.Read()

注釈

InstallAssembly は、登録、タイプ ライブラリの生成、タイプ ライブラリの登録、指定されたアプリケーションでのタイプ ライブラリのインストール、およびタイプ ライブラリに含まれるコンポーネントの構成の手順を実行します。

このメソッドでは、呼び出し元がローカル コンピューターに対する管理特権を持っている必要があります。

適用対象

InstallAssembly(String, String, String, String, InstallationFlags)

名前付きアセンブリを COM+ アプリケーションにインストールします。

public:
 void InstallAssembly(System::String ^ assembly, System::String ^ % application, System::String ^ partition, System::String ^ % tlb, System::EnterpriseServices::InstallationFlags installFlags);
public void InstallAssembly (string assembly, ref string application, string partition, ref string tlb, System.EnterpriseServices.InstallationFlags installFlags);
member this.InstallAssembly : string * string * string * string * System.EnterpriseServices.InstallationFlags -> unit
Public Sub InstallAssembly (assembly As String, ByRef application As String, partition As String, ByRef tlb As String, installFlags As InstallationFlags)

パラメーター

assembly
String

インストールするアセンブリのファイル名。

application
String

インストール先の COM+ アプリケーションの名前。 このパラメーターは、null に設定できます。 パラメーターが null で、アセンブリに ApplicationNameAttribute が格納されている場合は、この属性が使用されます。 それ以外の場合は、アセンブリの名前に基づいたアプリケーションの名前が生成されて返されます。

partition
String

パーティションの名前。 このパラメーターは、null に設定できます。

tlb
String

タイプ ライブラリ エクスポーター (Tlbexp.exe) 出力ファイルの名前。または、登録ヘルパーがその名前を生成することになっている場合は null を含んでいる文字列。 呼び出しが完了すると、使用された実際の名前がパラメーターに配置されます。

installFlags
InstallationFlags

InstallationFlags 値のビットごとの組み合わせ。

例外

入力アセンブリには厳密な名前がありません。

注釈

InstallAssembly は、登録、タイプ ライブラリの生成、タイプ ライブラリの登録、指定されたアプリケーションでのタイプ ライブラリのインストール、およびタイプ ライブラリに含まれるコンポーネントの構成の手順を実行します。

このメソッドでは、呼び出し元がローカル コンピューターに対する管理特権を持っている必要があります。

適用対象