How can I obtain the version number of my program ???? Urgent !!!!!!!!!!!!

Source: Internet
Author: User
How can I obtain the version number of my program ???? Urgent !!!!!!!!!!!! Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiBase/html/delphi_20061215121930148.html
How to get yourself Program Version Number ???? Urgent !!!!!!!!!!!!

Please provide detailed Code !

Function getfileversion (filename: string): string;
VaR
Infosize, WND: DWORD;
Verbuf: pointer;
FI: pvsfixedfileinfo;
Versize: DWORD;
Begin
Result: = '';
Infosize: = getfileversioninfosize (pchar (filename), WND );
If infosize <> 0 then
Begin
Getmem (verbuf, infosize );
Try
If getfileversioninfo (pchar (filename), WND, infosize, verbuf) then
If verqueryvalue (verbuf, '\', pointer (FI), versize) then
Begin
Result: = inttostr (Fi. dwfileversionms Div $ FFFF );
Result: = Result + '.' + inttostr (Fi. dwfileversionms mod $10000 );
Result: = Result + '.' + inttostr (Fi. dwfileversionls Div $ FFFF );
Result: = Result + '.' + inttostr (Fi. dwfileversionls mod $10000 );
End;
Finally
Freemem (verbuf );
End;
End;
End;

Procedure taboutform. formcreate (Sender: tobject );
VaR
Strtemp, filename: string;
Begin
Filename: = application. exename + CHR (0 );
Strtemp: = getfileversion (filename );
If strtemp <> ''then
Label1.caption: = '(V' + strtemp + ')';
End;

It's late. Points.

Ding

Use the raize component's trzversioninfostatus

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.