美文网首页
TComponent::UpdateRegistry - C++

TComponent::UpdateRegistry - C++

作者: 玄坴 | 来源:发表于2020-05-17 10:49 被阅读0次

C++ Builder 参考手册TComponentUpdateRegistry


头文件:#include <System.Classes.hpp>
命名空间:System::Classes
类:TComponent
访问权限:protected:
函数原型:

__classmethod virtual void __fastcall UpdateRegistry(
    bool Register, 
    const System::UnicodeString ClassID, 
    const System::UnicodeString ProgID);

System::Classes::TComponent::UpdateRegistry 是 System::Classes::TComponent 的静态成员函数,如果组件实现了 COM 接口,UpdateRegistry 会在注册表里面添加类型库信息。

参数:

Register:true 加入注册表;false 从注册表里面删除;
ClassID:GUID 字符串,可以用 System::Sysutils::GUIDToString 生成;
ProgID:COM 应用程序的 ID,格式为 "应用程序名.类名";

返回值:

无。

  • 如果组件实现了 COM 接口,UpdateRegistry 会在注册表里面添加类型库信息;
  • TComponent::UpdateRegistry 没有代码,子类如果需要这个功能需要重载这个方法;
  • 在源码里面只发现 Datasnap::Databkr::TRemoteDataModule 重载了 UpdateRegistry 方法;
  • 这是组件内部调用的方法,不要直接调用。

参考:


C++ Builder 参考手册TComponentUpdateRegistry

相关文章

网友评论

      本文标题:TComponent::UpdateRegistry - C++

      本文链接:https://www.haomeiwen.com/subject/jloomhtx.html