开发者

What is a DLL's "image version" used for (set with the /VERSION Visual C++ linker switch)?

I've read the documentation for the Visua开发者_如何学Gol C++ /VERSION linker switch ( http://msdn.microsoft.com/en-us/library/h88b7dc8.aspx ) and I understand that this value is shown as the "image version" when you use "dumpbin /headers", but it is not clear to me why you would set the "image version" or what happens if you don't set it and use the default value of "0.0".

Could someone explain to me why you might set the "image version"? Is this value now obsolete?


Here is the best explanation I could find: 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.

The last sentence seems to imply this is used as a last check when loading DLLs (when your EXE binds a specific DLL version). That seems to align with the behavior that was seen with Vista's Program Compatibility Assistant (PCA) mentioned in the comment above.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜