Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   API de Windows (https://www.clubdelphi.com/foros/forumdisplay.php?f=7)
-   -   Ayuda con la función GetFileVersionInfoSize (https://www.clubdelphi.com/foros/showthread.php?t=18097)

jaderl 01-02-2005 15:37:56

Ayuda con la función GetFileVersionInfoSize
 
Hola amigos del foro...

Saludos desde Colombia....

Estoy tratando de utilizar el siguiente código en Delphi 7.0 Profesional:

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;

Pero al compilarlo me sale un error de compilación: undeclared identifier 'GetFileVersionInfoSize'.

Que unidades tengo que agregar para que este código funcione correctamente...

chao

Gracias...

Coco 01-02-2005 19:14:14

agrega esta linea en tu proyecto:

uses Windows;

Saludos.
Coco


La franja horaria es GMT +2. Ahora son las 01:11:06.

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