#include<windows.h>
#include<winver.h>
///引入Version.lib库
QString InfomationCollect::GetFileVertion( QString fullName )
{
DWORD dwLen = 0;
char* lpData=NULL;
BOOL bSuccess = FALSE;
QString fileInfomation;
//获得文件基础信息
//--------------------------------------------------------
dwLen = GetFileVersionInfoSize(fullName.toStdWString().c_str(), 0);
if (0 == dwLen)
{
//qDebug()<<"Get file verstion error! ";
return "";
}
lpData =new char [dwLen+1];
bSuccess = GetFileVersionInfo(fullName.toStdWString().c_str(), 0, dwLen, lpData);
if (!bSuccess)
{
//qDebug()<<"Get file verstion error! ";
delete lpData;
return "";
}
LPVOID lpBuffer = NULL;
UINT uLen = 0;
//获得语言和代码页(language and code page)
//---------------------------------------------------
bSuccess = VerQueryValue(lpData,