《Windows API巡礼》---GetFileVersionInfo函数和VerQueryValue函数
来源:互联网 发布:马苏年轻照片知乎 编辑:程序博客网 时间:2024/05/07 20:15
VS_FIXEDFILEINFO结构包含了文件的版本信息:
GetFileVersionInfoSize函数用于判断系统能否检索到指定文件的版本信息,如果可以,函数返回版本信息的字节大小:
GetFileVersionInfo函数用来获得指定文件的版本信息:
VerQueryValue函数用于从指定的版本信息源获取版本信息,在调用该函数之前,需要先依次调用函数GetFileVersionInfoSize和GetFileVersionInfo:
上面参数lpSubBlock取值中的string-name必须是下面系统预定义的字符串之一:
下面代码实例封装了一个文件版本信息类,使用上面介绍的函数方便地获取文件版本信息,头文件定义如下FileVersion.h:
头文件的实现如下FileVersion.cpp:
- 《Windows API巡礼》---GetFileVersionInfo函数和VerQueryValue函数
- WindowsAPI之GetFileVersionInfo函数和VerQueryValue函数
- 《Windows API巡礼》のGetObject函数和GradientFill函数
- 《Windows API巡礼》之MultiByteToWideChar函数和WideCharToMultiByte函数
- 【转】取文件属性:GetFileVersionInfoSize,GetFileVersionInfo,VerQueryValue三个函数的配合
- 《Windows API巡礼》のGetWindowLong和SetWindowLong函数
- 《Windows API巡礼》のShell_NotifyIcon函数和NOTIFYICONDATA结构
- 《Windows API巡礼》のGetDlgItem*函数
- 《Windows API巡礼》のDisableThreadLibraryCalls函数
- 《Windows API巡礼》---StringCbCopy和StringCchCopy
- 《Windows API巡礼》---GetCurrentDirectory和GetModuleFileName
- 《Windows API巡礼》---GetEnvironmentStrings和GetEnvironmentVariable
- 《Windows API巡礼》--CreateRemoteThread和WriteProcessMemory
- 《Windows API巡礼》---VirtualAlloc和VirtualFree
- 《Windows API巡礼》---WSAStartup和WSACleanup
- 《Windows API巡礼》---socket和bind
- 《Windows API巡礼》---listen、accept和connect
- 《Windows API巡礼》---send和recv
- extjs的border布局在collapse下显示title
- HTTP实现流媒体的原理
- ie7打开页面有源文件但页面空白问题的解决方法
- 离职了,总结的一些系统分析的经验
- AD8403的驱动程序
- 《Windows API巡礼》---GetFileVersionInfo函数和VerQueryValue函数
- WCF Introdution
- TCP协议调优-强制快速重传技术(Spurious retransmissions)
- postgres中的describe table 实现方式
- ASP.NET用户控件说明和添加事件
- 重写规则
- 学习easyjweb 1.3 beta遇到问题
- 【数论 / 数值】【RQNOJ】[HNOI2006]鬼谷子的钱袋
- 文件操作系列之四——(CFile类的文件操作)