CWinApp-derived Class for Retrieving Version Information

This class was developed for the easy accessing of version information from a resource file. It is derived from CWinApp and implements accessor the function you will most likely need to use. As the code is fairly straightforward, I'll let you look at the source for more information.

Here's all you need to do to use this class:
  1. Add the CVersionApp.cpp and CVersionApp.h to your Project
  2. Derive your CWinApp class from CVersionApp
  3. Call the virtual CVersionApp::InitInstance() function from your CWinApp::InitInstance()

BOOL CYourWinApp::InitInstance()
{
 ....
 return CVersionApp::InitInstance();
}

Downloads

Download demo project - 49 Kb
Download source - 3 Kb



Comments

  • Good, but two proposals

    Posted by Legacy on 05/28/2003 12:00am

    Originally posted by: Thomas Hetzer

    Thanks for the code- it works fine for me. But I have two small recommendations:

    - fix the code for UNICODE projects (a few calls missing the _T("...")).

    - make the get-methods const.


    Best regards,
    Thomas

    Reply
  • ReadFileTime() fails!

    Posted by Legacy on 10/04/2000 12:00am

    Originally posted by: Haragan

    Can't access to EXE file for read time. Open(...) fails ever, and can't retrieve file time.
    
    

    -----
    CFile file;
    if(file.Open(m_VersionInfo.sFilePath,CFile::modeRead,NULL))
    {
    BOOL bRet=GetFileTime((HANDLE)file.m_hFile,&m_CreationTime,&m_LastAccessTime,&m_LastWriteTime);
    file.Close();
    return bRet;
    }
    return FALSE;
    ------

    David.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Companies must routinely transfer files and share data to run their business, work with partners, and speed operations. However, many find the traditional approach to file transfer lacks necessary security, is too complex and difficult to manage, does not support the levels of automation needed, and breaks down when addressing the file transfer requirements of new areas like Big Data analytics and mobile applications. This QuinStreet SmartSelect discusses how the changing business environment is making the use …

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds