.RGS文件如何工作 [英] how does the .RGS file works

查看:635
本文介绍了.RGS文件如何工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在.rgs文件中,有一些注册表信息,我想知道.rgs文件中的信息如何添加到regetry中?

In the .rgs file, there are some registry info, and I want to know how does the info in .rgs file added into regetry?

项目 AAA ,它会生成 AAA.DLL 文件,并且有一个包含注册表信息的文件 xxx.rgs 和AAA .DLL被构建,然后它将被部署到另一台机器B,所以我不知道如何注册信息可以添加在机器B上,我需要注册AAA.dll使用regsvr32命令?

I have a project AAA and it will generate the file AAA.DLL, and there is a file xxx.rgs which contains the registry info, and the AAA.DLL is built, then it will be deployed to another machine B, so I don't know how the registy info can be added on machine B, do I need register AAA.dll using regsvr32 command?

推荐答案

通常您的代码调用 CComModule :: UpdateRegistryFromResource() ,后者又将控制传递到ATL中实现的特殊机制, - 通过将.rgs文件嵌入到模块中并编辑注册表来解析生成的资源。 ATL提供了源代码,因此您只需阅读它的操作方式。

Usually your code calls CComModule::UpdateRegistryFromResource() which in turn passes control to a special mechanism implemented in ATL which does the job - parses the resource that was produced by embedding the .rgs file into the module and edits the registry. ATL comes with sources so you can just read how it is done.

这篇关于.RGS文件如何工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆