Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get file version of an MFC application?

How to get file version of an MFC application?

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestionannouncementlearning
4 Posts 2 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kapardhi
    wrote on last edited by
    #1

    Hai! In any MFC dialog based application if we go to Resource view->and click on Version we get a version info of our application in the version info there are two bocks : 1. FILEVERSION 1,0,0,1 and PRODUCTVERSION 1,0,0,1 etc then a black line as separator then 2. Block header, Comments , company name and then File vesion product version etc. Now i need to get the file version of my application programatically, i am currently using GetFileVersionInfo (), this function gets the file version fron 2nd or lower block, i need the file version from 1st block FILEVERSION, is there any direct function?? Thanks!

    N 1 Reply Last reply
    0
    • K kapardhi

      Hai! In any MFC dialog based application if we go to Resource view->and click on Version we get a version info of our application in the version info there are two bocks : 1. FILEVERSION 1,0,0,1 and PRODUCTVERSION 1,0,0,1 etc then a black line as separator then 2. Block header, Comments , company name and then File vesion product version etc. Now i need to get the file version of my application programatically, i am currently using GetFileVersionInfo (), this function gets the file version fron 2nd or lower block, i need the file version from 1st block FILEVERSION, is there any direct function?? Thanks!

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      kapardhi wrote:

      Now i need to get the file version of my application programatically, i am currently using GetFileVersionInfo (), this function gets the file version fron 2nd or lower block, i need the file version from 1st block FILEVERSION, is there any direct function??

      User GetFileVersionInfo function. For a demo have a look at the Process viewer[^] application.

      Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

      K 1 Reply Last reply
      0
      • N Nibu babu thomas

        kapardhi wrote:

        Now i need to get the file version of my application programatically, i am currently using GetFileVersionInfo (), this function gets the file version fron 2nd or lower block, i need the file version from 1st block FILEVERSION, is there any direct function??

        User GetFileVersionInfo function. For a demo have a look at the Process viewer[^] application.

        Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

        K Offline
        K Offline
        kapardhi
        wrote on last edited by
        #3

        Sorry for not providing a detailed information! I actually want to get the version information programmatically for a Pocket PC WIN CE device, I am developing the application in eVC++ I have used GetFileVersionSize (), GetFileVersionInfo (), VerQueryValue() in Visual studio 2005, which was working but not in eVC++ Can i get version information for a PocketPC Application, because if i implement the above functions i get 1814 as error using GetLastError() after executing GetFileVersionInfo() stating "The specified resource name cannot be found in the image file." what does this mean ?? Thanks!

        N 1 Reply Last reply
        0
        • K kapardhi

          Sorry for not providing a detailed information! I actually want to get the version information programmatically for a Pocket PC WIN CE device, I am developing the application in eVC++ I have used GetFileVersionSize (), GetFileVersionInfo (), VerQueryValue() in Visual studio 2005, which was working but not in eVC++ Can i get version information for a PocketPC Application, because if i implement the above functions i get 1814 as error using GetLastError() after executing GetFileVersionInfo() stating "The specified resource name cannot be found in the image file." what does this mean ?? Thanks!

          N Offline
          N Offline
          Nibu babu thomas
          wrote on last edited by
          #4

          Can you check here? http://www.eggheadcafe.com/forumarchives/windowsceembedded/Nov2005/post24225478.asp[^]

          Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups