Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I am very impressed with the site and have already recommended it to one of my associates. I was truly impressed with the quickness in which someone actually responded to my question..."

Geography

Where in the world do Tek-Tips members come from?
fiver1 (Programmer)
25 Jan 01 8:48
How do I extract the Version Info (ie. 2.2.1.54) to display on a form such as an About box?
2ffat (Programmer)
25 Jan 01 13:00
One way is to call a Windows API function. If noboy can come up with a better solution in a couple of days, I dig out my notes and post them here.

James P. Cottingham
www.ivcusa.com

fiver1 (Programmer)
26 Jan 01 9:10
Thanks
2ffat (Programmer)
7 Feb 01 8:04
Well, nobody has posted anything, so I'll give it a try. I was hoping to get an example but I haven't had time. The only exmaple that I've found was at Borland's ite in their Community but it was in Pascal (Delphi). You need to call three Windows APIs:
DWORD GetFileVersionInfoSize(
LPTSTR lptstrFilename, // file name
LPDWORD lpdwHandle // set to zero
);

If the value return by this is zero, then it failed and you can't get the version.

BOOL GetFileVersionInfo(
LPSTR
lptstrFilename, // file name (same as above)
DWORD dwHandle, // ignored
DWORD dwLen, // size of buffer from above API
LPVOID lpData // version info buffer
)

Then you call:
DWORD GetFileVersionInfoSize(
LPTSTR
lptstrFilename, // file name (same as above)
LPDWORD lpdwHandle // set to zero
)

See msdn.microsoft.com/libary and search for these APIs for more info. Sorry I can't be of more help.

James P. Cottingham
www.ivcusa.com

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close