【分享】马大哈系列功能模块----取文件信息(版本号,公司名称等)
VB里面取自己的版本信息比较简单,使用APP对象即可.但要取得别的文件的相关信息,需要调用GetFileVersionInfo来完成,有一堆代码,比较麻烦.
这里这个模块将代码封装了一下,使得调用大大简化,如下:
Public Function GetFileVerInfo(FullFileName As String) As String()
'返回的数组中各元素的说明:
'0 = FileVersion, 1 = InternalName, 2 = CompanyName, 3 = LegalCopyright, 4 = FileDescription.
msgbox GetFileVerInfo("C:\windows\notepad.exe")(0) '版本号
msgbox GetFileVerInfo("C:\windows\notepad.exe")(1) '产品名称
msgbox GetFileVerInfo("C:\windows\notepad.exe")(2) '公司名称
msgbox GetFileVerInfo("C:\windows\notepad.exe")(3) '版权信息
msgbox GetFileVerInfo("C:\windows\notepad.exe")(4) '文件描述
**************************************************
修改了一下,增加了一个功能,可以在没有Translation节的情况下,尝试自己解析,得到代码页信息. 谢谢! 好东西啊,正在找呢,刚好就在马哥这里看到了,谢谢分享 **************************************************
修改了一下,增加了一个功能,可以在没有Translation节的情况下,尝试自己解析,得到代码页信息. 请问这个模块怎么调用? 只有唯一一个函数,上面有例子.
返回值是数组. 马总在打造vb版易语言模块
页:
[1]