RegistrationServices 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供一组用于注册和注销托管程序集的服务,供 COM 使用。
public ref class RegistrationServices : System::Runtime::InteropServices::IRegistrationServices
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")]
public class RegistrationServices : System.Runtime.InteropServices.IRegistrationServices
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")]
[System.Runtime.InteropServices.ComVisible(true)]
public class RegistrationServices : System.Runtime.InteropServices.IRegistrationServices
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")>]
type RegistrationServices = class
interface IRegistrationServices
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.Guid("475E398F-8AFA-43a7-A3BE-F4EF8D6787C9")>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type RegistrationServices = class
interface IRegistrationServices
Public Class RegistrationServices
Implements IRegistrationServices
- 继承
-
RegistrationServices
- 属性
- 实现
注解
COM 客户端使用程序集中的对象时,需要注册。 Regasm.exe(程序集注册工具)和Microsoft Visual Studio 2005 使用 RegistrationServices 类公开的方法添加或删除托管程序集启用 COM 的注册表项。
可以使用以下方法来帮助你准备注册文件:
尽管这些方法有助于收集在注册文件中使用的信息,但它们实际上不会生成注册文件。 相反,可以使用 Regasm.exe(程序集注册工具)工具来/regfile执行此任务。
RegistrationServices 方法无法导出和注册类型库。 若要导出和注册类型库,可以使用 Regasm.exe(程序集注册工具) 工具和 Tlbexp.exe(类型库导出程序) 工具。
构造函数
| 名称 | 说明 |
|---|---|
| RegistrationServices() |
初始化 RegistrationServices 类的新实例。 |
方法
| 名称 | 说明 |
|---|---|
| Equals(Object) |
确定指定的对象是否等于当前对象。 (继承自 Object) |
| GetHashCode() |
用作默认哈希函数。 (继承自 Object) |
| GetManagedCategoryGuid() |
返回包含托管类的 COM 类别的 GUID。 |
| GetProgIdForType(Type) |
检索指定类型的 COM ProgID。 |
| GetRegistrableTypesInAssembly(Assembly) |
检索将由调用注册 RegisterAssembly(Assembly, AssemblyRegistrationFlags)的程序集中的类的列表。 |
| GetType() |
获取当前实例的 Type。 (继承自 Object) |
| MemberwiseClone() |
创建当前 Object的浅表副本。 (继承自 Object) |
| RegisterAssembly(Assembly, AssemblyRegistrationFlags) |
在托管程序集中注册类以启用从 COM 创建。 |
| RegisterTypeForComClients(Type, Guid) |
使用指定的 GUID 向 COM 注册指定类型。 |
| RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) |
使用指定的执行上下文和连接类型向 COM 注册指定类型。 |
| ToString() |
返回一个表示当前对象的字符串。 (继承自 Object) |
| TypeRepresentsComType(Type) |
指示类型是使用 < |
| TypeRequiresRegistration(Type) |
确定指定类型是否需要注册。 |
| UnregisterAssembly(Assembly) |
取消注册托管程序集中的类。 |
| UnregisterTypeForComClients(Int32) |
删除对向方法注册的类型的 RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) 引用。 |