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. READ FROM RESOURCE FILE

READ FROM RESOURCE FILE

Scheduled Pinned Locked Moved C / C++ / MFC
questionannouncementlearning
3 Posts 3 Posters 0 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.
  • C Offline
    C Offline
    Cheickna
    wrote on last edited by
    #1

    Hi, I want to read version number and company name from RC File at run time. How can i do this ? Thanks in advance

    I 1 Reply Last reply
    0
    • C Cheickna

      Hi, I want to read version number and company name from RC File at run time. How can i do this ? Thanks in advance

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      If you mean "read version information from the resources of a module at runtime", then you can use GetFileVersionInfo (...). You can even use it on the calling module by using GetModuleFilename to get the path to use. There is even an article "ShowVer.exe command-line VERSIONINFO display program"[^] with example code. If you really mean from an .RC file, then just read it as text and parse it.

      A 1 Reply Last reply
      0
      • I Iain Clarke Warrior Programmer

        If you mean "read version information from the resources of a module at runtime", then you can use GetFileVersionInfo (...). You can even use it on the calling module by using GetModuleFilename to get the path to use. There is even an article "ShowVer.exe command-line VERSIONINFO display program"[^] with example code. If you really mean from an .RC file, then just read it as text and parse it.

        A Offline
        A Offline
        Alexander M
        wrote on last edited by
        #3

        another way is to load the resource section by calling findresource and loadresource. Don't try it, just do it! ;-)

        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