Newsgroup: it.comp.lang.vo-clipper
Titolo: Controllo versione file.

In un'applicazione creata con VO 2.0 ho bisogno di controllare la
versone di un file .exe o .dll.
Chi mi puň aiutare?
Grazie.


Ma... scusa non puoi controllare la data di creazione /modifica ?

 Ma... scusa non puoi controllare la data di creazione /modifica ?
No a me interessa conoscere il numero di versione, comunque ho ottenuto
risposta dal gruppo di discussione in inglese, che allego  cosě come
ricevuto:
Below are an example, for a complete listing try here:
http://members.xoom.com/n_s_wong/vo/win32api/verinfo/index.htm
Regards,
Wong
Source code for verexe.exe
verinfo/verexe.txt 11-May-00
http://members.xoom.com/n_s_wong
http://www.angelfire.com/ns/nswong
E-mail, Fax, and Tel are user-defined version information
string, not predefined version information string.
verexe.exe
----------
RESOURCE PK ICON pk.ico
RESOURCE VS_VERSION_INFO VERSIONINFO
  FILEVERSION    2,5,0,__VERSION__
  PRODUCTVERSION 2,5,0,__VERSION__
  FILEFLAGSMASK  0x3fL
  FILEFLAGS      VS_FF_DEBUG|VS_FF_PRERELEASE+;
    VS_FF_SPECIALBUILD
  FILEOS         VOS__WINDOWS32
  FILETYPE       VFT_APP
  FILESUBTYPE    0x0L
BEGIN
  BLOCK "StringFileInfo"
  BEGIN   BLOCK "040904b0"
    BEGIN
      VALUE "Comments", "Not all are predefined ";
        "version information string\0"
      VALUE "CompanyName", "PK COMPUTER SERVICES\0"
      VALUE "E-mail", "
pk...@tm.net.my
\0"
      VALUE "Fax", "
603-6379414
\0"
      VALUE "FileDescription", ;
        "EXE to demonstrate VS_VERSION_INFO\0"
      VALUE "FileVersion", "08-Apr-00\0"
      VALUE "InternalName", "VS_VERSION_INFO EXE\0"
      VALUE "LegalCopyright", ;
        "Copyright PKCS\251 1988 - 2000\0"
      VALUE "LegalTrademarks", ;
        "HRMAS\256 is a trademark of PKCS\0"
      VALUE "OriginalFilename", "verexe.exe\0"
      VALUE "ProductName", "HRMAS\0"
      VALUE "ProductVersion", "2.5a-1\0"
      VALUE "SpecialBuild", "For web site example\0"
      VALUE "Tel", "
603-6378648
\0"
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x409, 1200
  END
END
PROCEDURE Start()
  LOCAL lptstrFilename AS PSZ
  LOCAL lpdwHandle AS DWORD PTR
  LOCAL dwHandle AS DWORD
  LOCAL dwLen AS DWORD
  LOCAL lpData AS PTR
  LOCAL pBlock AS PTR
  LOCAL lpSubBlock AS PSZ
  LOCAL lplpBuffer AS PTR
  LOCAL lpBuffer AS PTR
  LOCAL puLen AS DWORD PTR
  LOCAL uLen AS DWORD
  LOCAL cCodepageLangID AS STRING
  LOCAL wLang AS DWORD
  LOCAL szLang AS PTR
  LOCAL nSize AS DWORD
  lptstrFilename:=String2Psz("verexe.exe")
  lpdwHandle:=@dwHandle
  dwLen:=GetFileVersionInfoSize(lptstrFilename, lpdwHandle)
  lpData:=MemAlloc(dwLen)
  GetFileVersionInfo(lptstrFilename, dwHandle, dwLen,;
    lpData)
  pBlock:=lpData
  lpSubBlock:=String2Psz(;
    "\StringFileInfo\040904b0\OriginalFilename")
  lplpBuffer:=@lpBuffer
  puLen:=@uLen
  VerQueryValue(pBlock, lpSubBlock, lplpBuffer, puLen)
  MessageBox(NULL,lpBuffer,;
    String2Psz("VS_VERSION_INFO"),0)
  lpSubBlock:=String2Psz("\VarFileInfo\Translation")
  VerQueryValue(pBlock, lpSubBlock, lplpBuffer, puLen)
  cCodepageLangID:=AsHexString(DWORD(lpBuffer))
  MessageBox(NULL,String2Psz(cCodepageLangID),;
    String2Psz("VS_VERSION_INFO"),0)
  wLang:=WORD(lpBuffer)
  szLang:=lpData
  nSize:=dwLen
  VerLanguageName(wLang,szLang,nSize)
  MessageBox(NULL,szLang,;
    String2Psz("VS_VERSION_INFO"),0)
  MemFree(lpData)
  verinfo()
RETURN