10
votes
Vote UpVote

Retrieving the application’s version string

Delphi Haven – If you need to retrieve at runtime your application’s version number, you’re targeting Windows, and you don’t mind just having the major and minor numbers, then SysUtils has a handy GetFileVersion function for the task: function GetAppVersionStr: string; var Rec: LongRec; begin Rec := LongRec(GetFileVersion(ParamStr(0))); Result := Format('%d.%d', [Rec.Hi, Rec.Lo]) end; If you want the ‘release’ and ‘build’ numbers as well, you’ll need to drop down to the Windows API: function GetAppVersionStr: string; var Exe: string; Size, Handle: ...
Favorite? Off-Topic? Chris Rolliston @ 2012-12-08 10:32

Statistics

Visits: 987
Votes: 10
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

berocoder
DavidI
DelphiRulez
François
Jørn E. Angeltveit
Paul Thornton
Ravaut123
stukelly
TOndrej
Wouter
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)