更改COM DLL的接口指南(资源补丁)
我必须构建 COM 库 (DLL) 的 OEM 版本。 有谁知道一个工具(资源黑客)可以在构建时间后替换我的一些界面指南?
我只想构建并测试一个 DLL,然后生成 OEM 版本。
I have to build OEM versions of a COM library (DLL).
Does anyone know a tool (ressource hacker) which may replace some of my interface guids after build time?
I just want to build and test one DLL and generate the OEM versions afterwards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知没有工具。您可以使用自动构建过程来实际构建具有不同 GUID 的 dll#。
No tool that I know of. You could use an automated build process to actually build dll#s with different GUID's.
替换已编译的二进制文件中的接口 ID 并不那么容易。它们通常是硬编码的,编译器将它们分配在静态存储中,它们甚至可能具有静态链接,因此您在查找它们时会遇到问题。还记得
QueryInterface()
通常是如何实现的吗?它不仅限于资源编辑,您必须实际修补二进制图像的静态数据,并且可能没有工具能够自动为您执行此操作。
由于您拥有完整的源代码,因此最好的选择就是重建二进制文件。
Replacing interface ids in the compiled binary is not that easy. They are usually hardcoded and the compiler allocates them in static storage and they might even have static linkage so you will have problems finding them. Remember how
QueryInterface()
is usually implemented?It's not limited to resource editing, you have to actually patch the static data of the binary image and likely no tool will be able to do this automatically for you.
Since you have the full source your best bet is to just rebuild the binary.