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

  • Live Event Date: September 10, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild". This loop of continuous delivery and continuous feedback is …

  • Application and data integration doesn't have to be slow and expensive. Learn how cloud-based integration platforms dramatically speed results and lower costs in this white paper by Bloor Research.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds