Solved

Using The MSVC Version Resource (VS_VERSION_INFO)

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 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