E
Eddy
Unregistered / Unconfirmed
GUEST, unregistred user!
var<br> dwHandle,dwInfoSize : DWORD;<br> InfoBuffer : Array of Char;<br> pInfoVal : Array of Byte;<br> asVal : AnsiString;<br> InfoValSize : UINT;<br>begin<br> dwInfoSize := GetFileVersionInfoSize(PChar(Application.ExeName),dwHandle);<br> if dwInfoSize <> 0 then begin<br> SetLength(InfoBuffer,dwInfoSize);<br> if GetFileVersionInfo(PChar(Application.ExeName),0,dwInfoSize,@InfoBuffer) then begin<br> VerQueryValue(InfoBuffer,'//VarFileInfo//Translation',pInfoVal,InfoValSize);<br> asVal := '//StringFileInfo//' + IntToHex(^((Word ^)pchInfoVal),4) + IntToHex(^((Word ^)@pchInfoVal[2]),4) + '//FileVersion//';<br> end;<br> end;<br> end;<br>end;<br><br>以上是我用来获取可执行文件的版本信息的一段程序,其他的错误暂且不说<br>当程序编译到VerQueryValue这个函数时总说参数类型不对:<br>“Types of actual and formal var parameters must be identical”<br>谁能帮我解决这个问题?