Solved

Extracting a file version

Posted on 1998-08-03
2
272 Views
Last Modified: 2013-11-19
I have a DLL that contains its own About box.  I would like that box to display its current version, based on the value I enter into the VS_VERSION resource.  How can I extract that information?  Furthermore, how can I extract the filename of the DLL when it is running, instead of hard-coding the name?
0
Comment
Question by:DenMan
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 40 total points
ID: 1320178
To extract any resource, you can use LoadResource() to get a pointer to the information. Then you can use pointer arithmetic and parsing to get at the correct information. Alternatively, you can use VerQueryFileEx() to get the information.

To extract any module name, you can use GetModuleFileName() and pass the HINSTANCE of the DLL.
0
 

Author Comment

by:DenMan
ID: 1320179
I am using MS Visual C++ 5.0--I couldn't find any reference to VerQueryFileEx() in the online help.  Where can I find more information on that function?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 84
windows 10 how make picture as desktop background 2 58
zeroFront challenge 7 80
FizzBuzz challenge 9 76
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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