RegistrationServices Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)


Public Class RegistrationServices
	Implements IRegistrationServices


Initializes a new instance of the RegistrationServices class.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


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


Retrieves the COM ProgID for the specified type.


Retrieves a list of classes in an assembly that would be registered by a call to RegisterAssembly.


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRegisterAssembly(Assembly, AssemblyRegistrationFlags)

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

System_CAPS_pubmethodRegisterTypeForComClients(Type, Guid)

Registers the specified type with COM using the specified GUID.

System_CAPS_pubmethodRegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)

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


Returns a string that represents the current object.(Inherited from Object.)


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.


Determines whether the specified type requires registration.


Unregisters the classes in a managed assembly.


Removes references to a type registered with the RegisterTypeForComClients method.

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.

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top