RegistrationHelper.InstallAssemblyFromConfig(RegistrationConfig) Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
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.