Solved

Using The MSVC Version Resource (VS_VERSION_INFO)

Posted on 1997-05-01
1
398 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 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

22 Experts available now in Live!

Get 1:1 Help Now