RegistrationServices.RegisterAssembly Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Registra as classes em um assembly gerenciado para habilitar a criação 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
O assembly a ser registrado.
Um AssemblyRegistrationFlags valor que indica as configurações especiais usadas ao registrar assembly.
Retornos
true se assembly contiver tipos que foram registrados com êxito; caso contrário false , se o assembly não contiver tipos qualificados.
Implementações
- Atributos
Exceções
assembly é null.
O nome completo é assemblynull.
-ou-
Um método marcado com ComRegisterFunctionAttribute não staticé .
-ou-
Há mais de um método marcado com ComRegisterFunctionAttribute um determinado nível da hierarquia.
-ou-
A assinatura do método marcado com ComRegisterFunctionAttribute não é válida.
Uma função de registro personalizado definida pelo usuário (marcada com o ComRegisterFunctionAttribute atributo) gera uma exceção.
Comentários
RegisterAssembly adiciona as entradas de registro apropriadas para os tipos no assembly especificado. Esse método também chama todas as funções de registro encontradas no assembly.
Use Assembly.Load para obter um assembly.