5e7 Subj : Versionnummer of Application / Bug Report To : borland.public.cpp.borlandcpp From : "Hainke" Date : Thu Oct 23 2003 12:07 pm Hello all, I tried to get the version nummer of an application, therefore I used the code example (see below) from the BCB 6 help. This example couldn't get compilied, so I tried to fix it, but I quite it, because it takes to much time or may expericence it to low. So could anybody give my a running example, how to get the version nummer? And if this code example contains a bug: Where is the replace to report such a bug? Thanks Steffen Code example: const AnsiString InfoStr[10] = {"CompanyName", "FileDescription", "FileVersion", "InternalName", "LegalCopyright", "LegalTradeMarks", "OriginalFileName", "ProductName", "ProductVersion", "Comments"}; char *ExeName = Application->ExeName.c_str(); DWORD n = GetFileVersionInfoSize(ExeName, n); if (n > 0) { char *pBuf = (char *) malloc(n); AnsiString temp = "VersionInfoSize = "; Memo1->Lines->Add(temp + IntToStr(n)); GetFileVersionInfo(ExeName, 0, n, pBuf); for (i = 0; i < 10; i++) { char *pValue; DWORD Len; temp = "StringFileInfo\\040904E4\\"; temp = temp + InfoStr[i]; if (VerQueryValue(pBuf, temp.c_str(), pValue, Len) Memo1->Lines->Add(InfoStr[i] + " = " + pValue); } free(pBuf); } else Memo1->Lines->Add("Keine Versionsinformation gefunden"); . 0