RegistrationServices.RegisterAssembly Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Regista as classes numa assembly gerida para permitir a criação a partir do COM.
public:
virtual bool RegisterAssembly(System::Reflection::Assembly ^ assembly, System::Runtime::InteropServices::AssemblyRegistrationFlags flags);
public virtual bool RegisterAssembly(System.Reflection.Assembly assembly, System.Runtime.InteropServices.AssemblyRegistrationFlags flags);
[System.Security.SecurityCritical]
public virtual bool RegisterAssembly(System.Reflection.Assembly assembly, System.Runtime.InteropServices.AssemblyRegistrationFlags flags);
abstract member RegisterAssembly : System.Reflection.Assembly * System.Runtime.InteropServices.AssemblyRegistrationFlags -> bool
override this.RegisterAssembly : System.Reflection.Assembly * System.Runtime.InteropServices.AssemblyRegistrationFlags -> bool
[<System.Security.SecurityCritical>]
abstract member RegisterAssembly : System.Reflection.Assembly * System.Runtime.InteropServices.AssemblyRegistrationFlags -> bool
override this.RegisterAssembly : System.Reflection.Assembly * System.Runtime.InteropServices.AssemblyRegistrationFlags -> bool
Public Overridable Function RegisterAssembly (assembly As Assembly, flags As AssemblyRegistrationFlags) As Boolean
Parâmetros
- assembly
- Assembly
A assembleia deve ser registada.
Um valor que AssemblyRegistrationFlags indica quaisquer definições especiais usadas ao registar assembly.
Devoluções
true se assembly contém tipos que foram registados com sucesso; caso contrário false , se a montagem não contiver tipos elegíveis.
Implementações
- Atributos
Exceções
assembly é null.
O nome completo é assemblynull.
-ou-
Um método marcado com ComRegisterFunctionAttribute não staticé .
-ou-
Existem mais do que um método marcado com ComRegisterFunctionAttribute num dado nível da hierarquia.
-ou-
A assinatura do método marcado com ComRegisterFunctionAttribute não é válida.
Uma função de registo personalizada definida pelo utilizador (marcada com o ComRegisterFunctionAttribute atributo) lança uma exceção.
Observações
RegisterAssembly adiciona as entradas de registo apropriadas para os tipos no conjunto especificado. Este método também chama quaisquer funções de registo encontradas na assembleia.
Usado Assembly.Load para conseguir uma montagem.