Registriert seit: 18. Mär 2005
1.682 Beiträge
Delphi 2006 Enterprise
|
Re: Komponente die Version ausliest gesucht
9. Jul 2006, 11:14
Hallo,
meinst Du sowas:
Delphi-Quellcode:
function GetVersionInfos(const Filename: WideString): AnsiString;
var
iSize: Integer;
Data: Pointer;
dw: DWord;
FileInfo: PVSFixedFileInfo;
begin
Result := '';
iSize := GetFileVersionInfoSizeW(PWideChar(Filename), dw);
if iSize > 0 then
begin
GetMem(Data, iSize);
if GetFileVersionInfoW(PWideChar(Filename), 0, iSize, Data) then
if VerQueryValue(Data, '\', Pointer(FileInfo), dw) then
Result := Format('v%d.%d.%d Build %d', [(FileInfo^.dwFileVersionMS shr 16),
(FileInfo^.dwFileVersionMS and $FFFF), (FileInfo^.dwFileVersionLS shr 16),
(FileInfo^.dwFileVersionLS and $FFFF)]);
FreeMem(Data, iSize);
end;
end;
Gruß
xaromz
|
|
Zitat
|