本文介绍了如何以编程方式获取 DLL 或 EXE 文件的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
我需要使用 C 或 C++ 中的 Win32 本机 API 获取 DLL 或 EXE 文件的产品版本和文件版本.我要不是寻找 Windows 版本,而是通过右键单击 DLL 文件,选择属性",然后查看详细信息"选项卡所看到的版本号.这通常是一个由四部分组成的虚线版本号 x.x.x.x.
I need to get the product version and file version for a DLL or EXE file using Win32 native APIs in C or C++. I'm not looking for the Windows version, but the version numbers that you see by right-clicking on a DLL file, selecting "Properties", then looking at the "Details" tab. This is usually a four-part dotted version number x.x.x.x.
推荐答案
您将使用 GetFileVersionInfo API.
请参阅 MSDN 上的使用版本信息网站.
See Using Version Information on the MSDN site.
示例:
这篇关于如何以编程方式获取 DLL 或 EXE 文件的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!