Compartir a través de


RegistrationHelper.InstallAssemblyFromConfig(RegistrationConfig) Método

Definición

Instala el ensamblado en una aplicación de 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)

Parámetros

regConfig
RegistrationConfig

RegistrationConfig que identifica el ensamblado que hay que instalar.

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar el InstalAssemblyFromConfig método para instalar un ensamblado con nombre en una aplicación 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)

Comentarios

Este método requiere que el autor de la llamada tenga privilegios administrativos en el equipo local.

Se aplica a