Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to get the file version of a exe Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
12-Sep-05
Category
Files Operation
Language
CBuilder 6.x
Views
208
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
Zvonicek, Pavel
Reference URL:
			1   
2   /*
3   This code shows how to get the file version of a exe.
4   */
5       unsigned long m;
6       int n = GetFileVersionInfoSize(Application->ExeName.c_str(), &m);
7       if (n)
8       {
9           char * Info = new char [n+1];
10          char * cisver;
11          unsigned int vel = 0;
12          int ii = GetFileVersionInfo(Application->ExeName.c_str(),
13              0, n, Info);
14          if (ii)
15          {            
16              ii = VerQueryValue(Info, 
17  TEXT("\\StringFileInfo\\040504E2\\FileVersion"),
18                  (LPVOID *) &cisver, &vel);
19              if (ii)
20              {
21                  AnsiString verze = AnsiString("Program Build No.: ") + cisver;
22                  ListBox1->Items->Add(verze);
23              }
24          }
25          delete [] Info;
26      }


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC