Solved

Using The MSVC Version Resource (VS_VERSION_INFO)

Posted on 1997-05-01
1
405 Views
Last Modified: 2013-12-04
Okay. The version resource is there, but how do I get the info out of it to display to a user on a dlg? Specifically the LegalCopyright info. . . I'm probably overlooking something simple and quick where MS named the function something obscure. Thanks.
0
Comment
Question by:maknight
1 Comment
 
LVL 1

Accepted Solution

by:
MFCGuy earned 50 total points
ID: 1397066
//Here's how I got the product version
//You question should be very similar...

DWORD dwBuffSize = ::GetFileVersionInfoSize((char*)LPCTSTR(fileName),&dwHandle);
if( ::GetFileVersionInfo((char*)LPCTSTR(fileName), 0, dwBuffSize, (LPVOID)szBuff ) )
{
   if( dwBuffSize && ::VerQueryValue(szBuff,                                                                              "\\StringFileInfo\\040904B0\\ProductVersion",                                                                  &lpInfo,                                                            (UINT*)&cch) )
//do something with the value                                    
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now