Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Obtener la version de mi proyecto (https://www.clubdelphi.com/foros/showthread.php?t=53)

ogorut 05-05-2003 12:39:28

Obtener la version de mi proyecto
 
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 16:06:30

Yo utilizo esta funcion

Código:

  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 13:34:37

Muchas gracias tio.
La funcion me ha servido perfectamente. Ojala la gente fuera tan eficiente como tu.
Un saludo.


La franja horaria es GMT +2. Ahora son las 01:40:12.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi