PDA

Ver la Versión Completa : Obtener la version de mi proyecto


ogorut
05-05-2003, 13:39:28
Buenas a todos.
Necesito saber como leer la version de mi proyecto que esta la zona de "project options" de delphi. Gracias.

__cadetill
05-05-2003, 17:06:30
Yo utilizo esta funcion


function GetAppVersion : string;
var Size, Size2: DWord;
Pt, Pt2: Pointer;
begin
Size := GetFileVersionInfoSize(PChar (ParamStr (0)), Size2);
if Size > 0 then
begin
GetMem (Pt, Size);
try
GetFileVersionInfo (PChar (ParamStr (0)), 0, Size, Pt);
VerQueryValue (Pt, '\', Pt2, Size2);
with TVSFixedFileInfo (Pt2^) do
begin
Result:= ' Versión '+
IntToStr (HiWord (dwFileVersionMS)) + '.' +
IntToStr (LoWord (dwFileVersionMS)) + ' Build ' +
IntToStr (HiWord (dwFileVersionLS)) + '.' +
IntToStr (LoWord (dwFileVersionLS));
end;
finally
FreeMem (Pt);
end;
end;
end;


Espero te sirva

ogorut
06-05-2003, 14:34:37
Muchas gracias tio.
La funcion me ha servido perfectamente. Ojala la gente fuera tan eficiente como tu.
Un saludo.