Solved

Extracting a file version

Posted on 1998-08-03
2
276 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to ask for filename column 8 37
Change owner from userA to server Local Administrators 7 71
ShiftLeft challenge 21 88
MaxSpan challenge 9 123
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.

735 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