visual-c++ - DLL 的 "image version"有何用途(使用/VERSION Visual C++ 链接器开关设置)?

标签 visual-c++ dll

我已阅读 Visual C++/VERSION 链接器开关 ( http://msdn.microsoft.com/en-us/library/h88b7dc8.aspx ) 的文档,并且我知道当您使用“dumpbin/headers”时,该值显示为“图像版本”,但不清楚对我来说,为什么要设置“图像版本”,或者如果不设置它并使用默认值“0.0”会发生什么。

有人可以向我解释一下为什么要设置“图像版本”吗?这个值现在已经过时了吗?

最佳答案

这是我能找到的最好的解释:http://www.dependencywalker.com/help/html/version_numbers.htm

IMAGE VERSION This value is set by the developer of the module by using the VERSION statement in their DEF file or by using the /VERSION linker option. It usually represents the version of the module or product that the module is part of, but can contain any value since it is up to the developer to set it. If the developer does not specify a version, then this value will default to 0.0. This value may be used as a last resort when comparing two modules to check which module is newer.

最后一句似乎暗示这是加载 DLL 时(当您的 EXE 绑定(bind)特定 DLL 版本时)的最后检查。这似乎与上面评论中提到的 Vista 程序兼容性助手 (PCA) 的行为一致。

关于visual-c++ - DLL 的 "image version"有何用途(使用/VERSION Visual C++ 链接器开关设置)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7403188/

相关文章:

c++ - 将 MSVC++ .lib 文件与 mingw 一起使用。名称修改

c++ - 引用 GetCapture() 函数捕获鼠标意味着什么?

c++ - VC++ 10 提示很多类型没有定义,C99

c - 从 DLL 写入内存时出错

java - UnsatisfiedLinkError - 无法加载库 - 在资源路径中找不到 native 库

c - 在另一个平台上运行一个 c 应用程序

c++ - 在 OpenGL 中移动 3d 形状

qt - 我正在尝试以 gif 格式保存 QImage

c++ - 错误处理范式 : Mixing Exceptions and Error Codes

c++ - 使用 GetProc 从 dll 中获取函数并单步执行它们?