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

  • On-demand Event Event Date: September 10, 2014 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 how the best mobile …

  • The explosion in mobile devices and applications has generated a great deal of interest in APIs. Today's businesses are under increased pressure to make it easy to build apps, supply tools to help developers work more quickly, and deploy operational analytics so they can track users, developers, application performance, and more. Apigee Edge provides comprehensive API delivery tools and both operational and business-level analytics in an integrated platform. It is available as on-premise software or through …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds