如何更新C ++ DLL而不需要使用lib文件重新链接exe? [英] How to update a C++ dll without needing to relink the exe with the lib file?

查看:428
本文介绍了如何更新C ++ DLL而不需要使用lib文件重新链接exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我指的是Windows环境和VC ++编译器。



我想要做的是重建一个Vc ++ dll并保持与...的兼容性一个已经链接到lib的exe,而不必重新构建exe,或者使用LoadLibrary动态加载DLL。换句话说,有没有办法向dll(但不删除任何)添加类和方法,并确保现有的entrypoints保持不变?

解决方案

如果您使用DEF文件导出函数并手动指定序数,则应该能够完成此操作。



参考



http:/ /msdn.microsoft.com/en-us/library/d91k01sh(VS.80).aspx


First off , I'm referring to a Windows environment and VC++ compiler.

What I want to be able to do is rebuild a Vc++ dll and maintain compatability with an exe that has already been linked to the lib without having to rebuild the exe or load the dll dynamically using LoadLibrary. In other words, is there a way to add classes and methods to a dll(but not remove any) and ensure the existing entrypoints remain the same?

解决方案

If you export the functions from using a DEF file and manually specify the ordinals, you should be able to accomplish this.

Reference

http://msdn.microsoft.com/en-us/library/d91k01sh(VS.80).aspx

这篇关于如何更新C ++ DLL而不需要使用lib文件重新链接exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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