function GetVersion(): string;
var
d1, d2: DWord;
VersionBuf: PChar;
pc: PChar;
InfoPath: string;
FileName: string;
begin
FileName := ParamStr(0);
D1 := 0;
D2 := GetFileVersionInfoSize(PWideChar(FileName), D1);
GetMem(VersionBuf, D2);
if GetFileVersionInfo(PWideChar(FileName), D1, D2, VersionBuf) then
begin
infoPath := '/StringFileInfo/080403A8/FileVersion';
pc := nil;
if VerQueryValue(versionbuf, PWideChar(InfoPath), Pointer(pc), d1) then
result := string(PChar(pc));
end;
FreeMem(VerSionBuf, D2);
end;
03-01
3042

“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交