Delphi 3: How to get version number in EXE after compile?
Posted on 1997-07-17
I have turned on the auto-increment version number feature on my Delphi 3 project. I have an About box, and would like to have the program get the version number that the complier generates.
I found a function with Delphi's crappy help files and tried the following:
procedure TAboutBoxCHDIR.FormCreate(Sender: TObject);
FName : PChar;
VerStr := StrAlloc(255);
FName := StrAlloc(255);
FName := StrPCopy(Fname, Application.Exename);
GetVersionOfFile(LongInt(FName), LongInt(VerStr), 254);
Version.Caption := 'Version ' + StrPas(VerStr);
But, it seems Borland didn't include the DLLs required for the GetVersionOfFile() function and the necessary interface unit.
Is there another way? A better way? Where can I get the needed msdetstf.dll for "importing" into my project?