System.Runtime.InteropServices.RegistrationServices Class

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

See Also: RegistrationServices Members

Syntax

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("475e398f-8afa-43a7-a3be-f4ef8d6787c9")]
public class RegistrationServices : IRegistrationServices

Remarks

Registration is needed when the objects within an assembly are being used by COM clients. The [<topic://cpgrfassemblyregistrationtoolregasmexe>] and vsprvsext use methods exposed by the System.Runtime.InteropServices.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 Assembly Registration Tool (Regasm.exe) tool with the /regfile option to perform this task. System.Runtime.InteropServices.RegistrationServices methods cannot export and register a type library. To export and register a type library, you can use the Assembly Registration Tool (Regasm.exe) tool and the Type Library Exporter (Tlbexp.exe) tool.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0