次の方法で共有


RegistrationHelper.InstallAssemblyFromConfig(RegistrationConfig) メソッド

定義

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

public:
 void InstallAssemblyFromConfig(System::EnterpriseServices::RegistrationConfig ^ % regConfig);
public void InstallAssemblyFromConfig (ref System.EnterpriseServices.RegistrationConfig regConfig);
member this.InstallAssemblyFromConfig : RegistrationConfig -> unit
Public Sub InstallAssemblyFromConfig (ByRef regConfig As RegistrationConfig)

パラメーター

regConfig
RegistrationConfig

インストールするアセンブリを識別する RegistrationConfig

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

// Create a RegistrationConfig object and set its attributes
// Create a RegistrationHelper object, and call the InstallAssemblyFromConfig
// method by passing the RegistrationConfiguration object to it as a 
// reference object
RegistrationConfig^ registrationConfiguration = gcnew RegistrationConfig;
registrationConfiguration->AssemblyFile = "C:..\\..\\QueuedComponent.dll";
registrationConfiguration->Application = "MyApp";
registrationConfiguration->InstallationFlags = InstallationFlags::CreateTargetApplication;
RegistrationHelper^ helperFromConfig = gcnew RegistrationHelper;
helperFromConfig->InstallAssemblyFromConfig(  registrationConfiguration );
// Create a RegistrationConfig object and set its attributes
// Create a RegistrationHelper object, and call the InstallAssemblyFromConfig
// method by passing the RegistrationConfiguration object to it as a
// reference object
RegistrationConfig registrationConfiguration = new RegistrationConfig();
registrationConfiguration.AssemblyFile=@"C:..\..\QueuedComponent.dll";
registrationConfiguration.Application = "MyApp";
registrationConfiguration.InstallationFlags = InstallationFlags.CreateTargetApplication;
RegistrationHelper helperFromConfig = new RegistrationHelper();
helperFromConfig.InstallAssemblyFromConfig(ref registrationConfiguration);
' Create a RegistrationConfig object and set its attributes
' Create a RegistrationHelper object, and call the InstallAssemblyFromConfig
' method by passing the RegistrationConfiguration object to it as a 
' reference object
Dim registrationConfiguration As New RegistrationConfig()
registrationConfiguration.AssemblyFile = "C:..\..\QueuedComponent.dll"
registrationConfiguration.Application = "MyApp"
registrationConfiguration.InstallationFlags = InstallationFlags.CreateTargetApplication
Dim helperFromConfig As New RegistrationHelper()
helperFromConfig.InstallAssemblyFromConfig(registrationConfiguration)

注釈

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

適用対象