RegistrationServices RegistrationServices RegistrationServices RegistrationServices Class

Definition

Provides a set of services for registering and unregistering managed assemblies for use from COM.

public ref class RegistrationServices : System::Runtime::InteropServices::IRegistrationServices
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("475e398f-8afa-43a7-a3be-f4ef8d6787c9")]
[System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")]
public class RegistrationServices : System.Runtime.InteropServices.IRegistrationServices
type RegistrationServices = class
    interface IRegistrationServices
Public Class RegistrationServices
Implements IRegistrationServices
Inheritance
RegistrationServicesRegistrationServicesRegistrationServicesRegistrationServices
Attributes
Implements

Remarks

Registration is needed when the objects within an assembly are being used by COM clients. The Regasm.exe (Assembly Registration Tool) and Microsoft Visual Studio 2005 use methods exposed by the RegistrationServices class to add or remove COM-enabling registry entries for managed assemblies.

You can use the following methods to assist you in preparing a registration file:

Although these methods help in gathering information to be used in a registration file, they do not actually produce a registration file. Instead, you can use the Regasm.exe (Assembly Registration Tool) tool with the /regfile option to perform this task. RegistrationServices methods cannot export and register a type library. To export and register a type library, you can use the Regasm.exe (Assembly Registration Tool) tool and the Tlbexp.exe (Type Library Exporter) tool.

Constructors

RegistrationServices() RegistrationServices() RegistrationServices() RegistrationServices()

Initializes a new instance of the RegistrationServices class.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetManagedCategoryGuid() GetManagedCategoryGuid() GetManagedCategoryGuid() GetManagedCategoryGuid()

Returns the GUID of the COM category that contains the managed classes.

GetProgIdForType(Type) GetProgIdForType(Type) GetProgIdForType(Type) GetProgIdForType(Type)

Retrieves the COM ProgID for the specified type.

GetRegistrableTypesInAssembly(Assembly) GetRegistrableTypesInAssembly(Assembly) GetRegistrableTypesInAssembly(Assembly) GetRegistrableTypesInAssembly(Assembly)

Retrieves a list of classes in an assembly that would be registered by a call to RegisterAssembly(Assembly, AssemblyRegistrationFlags).

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RegisterAssembly(Assembly, AssemblyRegistrationFlags) RegisterAssembly(Assembly, AssemblyRegistrationFlags) RegisterAssembly(Assembly, AssemblyRegistrationFlags) RegisterAssembly(Assembly, AssemblyRegistrationFlags)

Registers the classes in a managed assembly to enable creation from COM.

RegisterTypeForComClients(Type, Guid) RegisterTypeForComClients(Type, Guid) RegisterTypeForComClients(Type, Guid) RegisterTypeForComClients(Type, Guid)

Registers the specified type with COM using the specified GUID.

RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)

Registers the specified type with COM using the specified execution context and connection type.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
TypeRepresentsComType(Type) TypeRepresentsComType(Type) TypeRepresentsComType(Type) TypeRepresentsComType(Type)

Indicates whether a type is marked with the ComImportAttribute, or derives from a type marked with the ComImportAttribute and shares the same GUID as the parent.

TypeRequiresRegistration(Type) TypeRequiresRegistration(Type) TypeRequiresRegistration(Type) TypeRequiresRegistration(Type)

Determines whether the specified type requires registration.

UnregisterAssembly(Assembly) UnregisterAssembly(Assembly) UnregisterAssembly(Assembly) UnregisterAssembly(Assembly)

Unregisters the classes in a managed assembly.

UnregisterTypeForComClients(Int32) UnregisterTypeForComClients(Int32) UnregisterTypeForComClients(Int32) UnregisterTypeForComClients(Int32)

Removes references to a type registered with the RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) method.

Applies to