function GetFileDescription(ModulName:
string):
String;
Var
FVISize, Dummy : Cardinal;
FVIData : Pointer;
FVILang :
array of byte;
LangCPage :
String;
FileDesc:
array of char;
begin
Result:='
';
try
FVISize := GetFileVersionInfoSize(PChar(ModulName), Dummy);
FVIData := AllocMem(FVISize);
try
GetFileVersionInfo(PChar(ModulName), 0, FVISize, FVIData);
VerQueryValue(FVIData, '
\VarFileInfo\Translation', Pointer(FVILang), Dummy);
if Dummy<>0
then begin
LangCPage := IntToHex(FVILang[2] + FVILang[3] * $100 + FVILang[0] * $10000 + FVILang[1] * $1000000, 8);
end else begin
LangCPage:='
040904E4';
end;
VerQueryValue(FVIData, PChar('
\StringFileInfo\' + LangCPage + '
\FileDescription'), Pointer(FileDesc), Dummy);
Result := PChar(FileDesc);
finally
FreeMem(FVIData);
end;
except
on E:
Exception do begin
Result:='
Fehler: '+#13#10+'
['+E.ClassName+'
] '+E.
Message;
end;
end;
end;